diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2009-09-08 19:49:47 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-09-08 19:49:47 -0400 |
commit | 4cfd74fc99a41fdc161f243e1c16199656d33ab1 (patch) | |
tree | b92cb5a87dfeb13cc042768351ffda6a64d58713 /fs/nfs/internal.h | |
parent | dbab8360ed8abca38121109feab47c4bea895994 (diff) | |
download | talos-op-linux-4cfd74fc99a41fdc161f243e1c16199656d33ab1.tar.gz talos-op-linux-4cfd74fc99a41fdc161f243e1c16199656d33ab1.zip |
NFS: Mount option parser should detect missing "port="
The meaning of not specifying the "port=" mount option is different
for "-t nfs" and "-t nfs4" mounts. The default port value for
NFSv2/v3 mounts is 0, but the default for NFSv4 mounts is 2049.
To support "-t nfs -o vers=4", the mount option parser must detect
when "port=" is missing so that the correct default port value can be
set depending on which NFS version is requested.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/internal.h')
-rw-r--r-- | fs/nfs/internal.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index 2e485677019c..5e686a4d744e 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -49,6 +49,11 @@ struct nfs_clone_mount { #define NFS_MAX_SECFLAVORS (12) /* + * Value used if the user did not specify a port value. + */ +#define NFS_UNSPEC_PORT (-1) + +/* * In-kernel mount arguments */ struct nfs_parsed_mount_data { @@ -71,7 +76,7 @@ struct nfs_parsed_mount_data { size_t addrlen; char *hostname; u32 version; - unsigned short port; + int port; unsigned short protocol; } mount_server; @@ -80,7 +85,7 @@ struct nfs_parsed_mount_data { size_t addrlen; char *hostname; char *export_path; - unsigned short port; + int port; unsigned short protocol; } nfs_server; |