diff options
author | \"Talpey, Thomas\ <Thomas.Talpey@netapp.com> | 2007-09-10 13:44:33 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-09 17:17:28 -0400 |
commit | 91ea40b9c6303ddab5c84f078f96b29084b45817 (patch) | |
tree | b7f48effc5adbb1b9c36a7e16ce9133d7152aad9 /fs/nfs/client.c | |
parent | 2283f8d6ed21ea2221df4cc329314b93f35351b0 (diff) |
NFS: use in-kernel mount argument structure for nfsv4 mounts
The user-visible nfs4_mount_data does not contain sufficient data to
describe new mount options, and also is now a legacy structure. Replace
it with the internal nfs_parsed_mount_data for nfsv4 in-kernel use.
Signed-off-by: Tom Talpey <tmt@netapp.com>
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r-- | fs/nfs/client.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index f51eabff3cd0..2edcbca1a161 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -908,7 +908,7 @@ error: | |||
908 | * Create a version 4 volume record | 908 | * Create a version 4 volume record |
909 | */ | 909 | */ |
910 | static int nfs4_init_server(struct nfs_server *server, | 910 | static int nfs4_init_server(struct nfs_server *server, |
911 | const struct nfs4_mount_data *data, rpc_authflavor_t authflavour) | 911 | const struct nfs_parsed_mount_data *data) |
912 | { | 912 | { |
913 | int error; | 913 | int error; |
914 | 914 | ||
@@ -928,7 +928,7 @@ static int nfs4_init_server(struct nfs_server *server, | |||
928 | server->acdirmin = data->acdirmin * HZ; | 928 | server->acdirmin = data->acdirmin * HZ; |
929 | server->acdirmax = data->acdirmax * HZ; | 929 | server->acdirmax = data->acdirmax * HZ; |
930 | 930 | ||
931 | error = nfs_init_server_rpcclient(server, authflavour); | 931 | error = nfs_init_server_rpcclient(server, data->auth_flavors[0]); |
932 | 932 | ||
933 | /* Done */ | 933 | /* Done */ |
934 | dprintk("<-- nfs4_init_server() = %d\n", error); | 934 | dprintk("<-- nfs4_init_server() = %d\n", error); |
@@ -939,12 +939,7 @@ static int nfs4_init_server(struct nfs_server *server, | |||
939 | * Create a version 4 volume record | 939 | * Create a version 4 volume record |
940 | * - keyed on server and FSID | 940 | * - keyed on server and FSID |
941 | */ | 941 | */ |
942 | struct nfs_server *nfs4_create_server(const struct nfs4_mount_data *data, | 942 | struct nfs_server *nfs4_create_server(const struct nfs_parsed_mount_data *data, |
943 | const char *hostname, | ||
944 | const struct sockaddr_in *addr, | ||
945 | const char *mntpath, | ||
946 | const char *ip_addr, | ||
947 | rpc_authflavor_t authflavour, | ||
948 | struct nfs_fh *mntfh) | 943 | struct nfs_fh *mntfh) |
949 | { | 944 | { |
950 | struct nfs_fattr fattr; | 945 | struct nfs_fattr fattr; |
@@ -958,13 +953,18 @@ struct nfs_server *nfs4_create_server(const struct nfs4_mount_data *data, | |||
958 | return ERR_PTR(-ENOMEM); | 953 | return ERR_PTR(-ENOMEM); |
959 | 954 | ||
960 | /* Get a client record */ | 955 | /* Get a client record */ |
961 | error = nfs4_set_client(server, hostname, addr, ip_addr, authflavour, | 956 | error = nfs4_set_client(server, |
962 | data->proto, data->timeo, data->retrans); | 957 | data->nfs_server.hostname, |
958 | &data->nfs_server.address, | ||
959 | data->client_address, | ||
960 | data->auth_flavors[0], | ||
961 | data->nfs_server.protocol, | ||
962 | data->timeo, data->retrans); | ||
963 | if (error < 0) | 963 | if (error < 0) |
964 | goto error; | 964 | goto error; |
965 | 965 | ||
966 | /* set up the general RPC client */ | 966 | /* set up the general RPC client */ |
967 | error = nfs4_init_server(server, data, authflavour); | 967 | error = nfs4_init_server(server, data); |
968 | if (error < 0) | 968 | if (error < 0) |
969 | goto error; | 969 | goto error; |
970 | 970 | ||
@@ -973,7 +973,7 @@ struct nfs_server *nfs4_create_server(const struct nfs4_mount_data *data, | |||
973 | BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops); | 973 | BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops); |
974 | 974 | ||
975 | /* Probe the root fh to retrieve its FSID */ | 975 | /* Probe the root fh to retrieve its FSID */ |
976 | error = nfs4_path_walk(server, mntfh, mntpath); | 976 | error = nfs4_path_walk(server, mntfh, data->nfs_server.export_path); |
977 | if (error < 0) | 977 | if (error < 0) |
978 | goto error; | 978 | goto error; |
979 | 979 | ||