aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/client.c
diff options
context:
space:
mode:
author\"Talpey, Thomas\ <Thomas.Talpey@netapp.com>2007-09-10 13:43:56 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-10-09 17:17:26 -0400
commit2283f8d6ed21ea2221df4cc329314b93f35351b0 (patch)
treedbf8b87e45b4fa76d50c0fd7ec0b3d4f1afd94ca /fs/nfs/client.c
parent6b18eaa0821a559c5e2b7ed4b90f8aca5a8e6228 (diff)
NFS: use in-kernel mount argument structure for nfsv[23] mounts
The user-visible nfs_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 nfsv[23] 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.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index a204484072f3..f51eabff3cd0 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -501,9 +501,9 @@ static int nfs_init_server_rpcclient(struct nfs_server *server, rpc_authflavor_t
501/* 501/*
502 * Initialise an NFS2 or NFS3 client 502 * Initialise an NFS2 or NFS3 client
503 */ 503 */
504static int nfs_init_client(struct nfs_client *clp, const struct nfs_mount_data *data) 504static int nfs_init_client(struct nfs_client *clp,
505 const struct nfs_parsed_mount_data *data)
505{ 506{
506 int proto = (data->flags & NFS_MOUNT_TCP) ? IPPROTO_TCP : IPPROTO_UDP;
507 int error; 507 int error;
508 508
509 if (clp->cl_cons_state == NFS_CS_READY) { 509 if (clp->cl_cons_state == NFS_CS_READY) {
@@ -522,8 +522,8 @@ static int nfs_init_client(struct nfs_client *clp, const struct nfs_mount_data *
522 * Create a client RPC handle for doing FSSTAT with UNIX auth only 522 * Create a client RPC handle for doing FSSTAT with UNIX auth only
523 * - RFC 2623, sec 2.3.2 523 * - RFC 2623, sec 2.3.2
524 */ 524 */
525 error = nfs_create_rpc_client(clp, proto, data->timeo, data->retrans, 525 error = nfs_create_rpc_client(clp, data->nfs_server.protocol,
526 RPC_AUTH_UNIX, 0); 526 data->timeo, data->retrans, RPC_AUTH_UNIX, 0);
527 if (error < 0) 527 if (error < 0)
528 goto error; 528 goto error;
529 nfs_mark_client_ready(clp, NFS_CS_READY); 529 nfs_mark_client_ready(clp, NFS_CS_READY);
@@ -538,7 +538,8 @@ error:
538/* 538/*
539 * Create a version 2 or 3 client 539 * Create a version 2 or 3 client
540 */ 540 */
541static int nfs_init_server(struct nfs_server *server, const struct nfs_mount_data *data) 541static int nfs_init_server(struct nfs_server *server,
542 const struct nfs_parsed_mount_data *data)
542{ 543{
543 struct nfs_client *clp; 544 struct nfs_client *clp;
544 int error, nfsvers = 2; 545 int error, nfsvers = 2;
@@ -551,7 +552,8 @@ static int nfs_init_server(struct nfs_server *server, const struct nfs_mount_dat
551#endif 552#endif
552 553
553 /* Allocate or find a client reference we can use */ 554 /* Allocate or find a client reference we can use */
554 clp = nfs_get_client(data->hostname, &data->addr, nfsvers); 555 clp = nfs_get_client(data->nfs_server.hostname,
556 &data->nfs_server.address, nfsvers);
555 if (IS_ERR(clp)) { 557 if (IS_ERR(clp)) {
556 dprintk("<-- nfs_init_server() = error %ld\n", PTR_ERR(clp)); 558 dprintk("<-- nfs_init_server() = error %ld\n", PTR_ERR(clp));
557 return PTR_ERR(clp); 559 return PTR_ERR(clp);
@@ -581,7 +583,7 @@ static int nfs_init_server(struct nfs_server *server, const struct nfs_mount_dat
581 if (error < 0) 583 if (error < 0)
582 goto error; 584 goto error;
583 585
584 error = nfs_init_server_rpcclient(server, data->pseudoflavor); 586 error = nfs_init_server_rpcclient(server, data->auth_flavors[0]);
585 if (error < 0) 587 if (error < 0)
586 goto error; 588 goto error;
587 589
@@ -760,7 +762,7 @@ void nfs_free_server(struct nfs_server *server)
760 * Create a version 2 or 3 volume record 762 * Create a version 2 or 3 volume record
761 * - keyed on server and FSID 763 * - keyed on server and FSID
762 */ 764 */
763struct nfs_server *nfs_create_server(const struct nfs_mount_data *data, 765struct nfs_server *nfs_create_server(const struct nfs_parsed_mount_data *data,
764 struct nfs_fh *mntfh) 766 struct nfs_fh *mntfh)
765{ 767{
766 struct nfs_server *server; 768 struct nfs_server *server;