On 05/ 5/10 02:52 PM, Alan Wright wrote:
On 05/ 5/10 08:08 AM, Tom Haynes wrote:

typedef struct share {
struct share *sh_next;
char *sh_path; /* share path */
char *sh_resource; /* share name */
char *sh_fstype; /* protocol string ("nfs" |
"smb") */
char *sh_opts; /* share property string */
char *sh_descr; /* share description */
size_t sh_size;
} share_t;


sh_fstype is not an appropriate name for the contents.

The contents are a protocol and not a filesystem.

sh_proto?

This is actually an existing structure. see:

uts/common/sharefs/share.h

And the layout botch is my fault.  No changes are planned
to the existing Nevada structure.

Alan

Yeah, I'm very familiar with that directory.

I dunno why we didn't fix this issue when we first did sharefs.

My guess is back then we talked in terms of fstypes and not
protocols.

I.e., look at the allowed types to share(1M):

[th199...@aus1500-home sharefs]> more /etc/dfs/fstypes
nfs NFS Utilities
autofs AUTOFS Utilities
cachefs CACHEFS Utilities
smbfs CIFS Utilities

Which brings up the point that share(1M) specifies that
the allowed values in sh_fstype are those defined in
fstypes(4). This also occurs with sharetab(4).

So those would be "nfs" and "smbfs". Not "nfs" and "smb".

Are we changing the parameters to the share command?
Or actually to the Distributed File System (DFS) Administration
commands?

Or does there already exist means for making this mapping
occur? (Yes, it is coded in sharemgr.)

I find that the intent laid out in the man pages is confusing
with the intent laid out in this case. And while some of the
existing code uses sh_fstype to mean a protocol, some of
it uses it to mean a filesystem type.

This case makes a change in what goes into sh_fstype and
uses the terminology "protocol" and not "filesystem". But
it also exposes that the input and output to the DFS
commands do not match the documentation.

If we want to retain fstypes, we need to change the proto
argument in all of the code to use "smbfs" and not "smb".

If we want to use protocols, we need to update the man
pages to the fact that sharetab(4) and friends are no
longer relying on fstypes(4) to define "fstype" and indeed
we ought to change "fstype" to be "proto" in the
man pages and "sh_fstype" to be "sh_proto" in the
code.

_______________________________________________
opensolaris-arc mailing list
[email protected]

Reply via email to