aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2007-04-14 17:01:15 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-05-01 01:17:16 -0400
commit74dd34e6e8bb127ff4c182423154b294729b663b (patch)
tree6e5aef4263a4026942efd03fc2ea974a419153b1 /fs/nfs
parent00a6e7bbf990e3a5e59a9a1e6a68e99c94fe001c (diff)
NFS: Added support to turn off the NFSv3 READDIRPLUS RPC.
READDIRPLUS can be a performance hindrance when the client is working with large directories. In addition, some servers still have bugs in their implementations (e.g. Tru64 returns wrong values for the fsid). Add a mount flag to enable users to turn it off at mount time following the implementation in Apple's NFS client. Signed-off-by: Steve Dickson <steved@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/client.c3
-rw-r--r--fs/nfs/super.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 2190e6c2792e..5bd03b97002e 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -618,7 +618,8 @@ static int nfs_init_server(struct nfs_server *server, const struct nfs_mount_dat
618 if (clp->cl_nfsversion == 3) { 618 if (clp->cl_nfsversion == 3) {
619 if (server->namelen == 0 || server->namelen > NFS3_MAXNAMLEN) 619 if (server->namelen == 0 || server->namelen > NFS3_MAXNAMLEN)
620 server->namelen = NFS3_MAXNAMLEN; 620 server->namelen = NFS3_MAXNAMLEN;
621 server->caps |= NFS_CAP_READDIRPLUS; 621 if (!(data->flags & NFS_MOUNT_NORDIRPLUS))
622 server->caps |= NFS_CAP_READDIRPLUS;
622 } else { 623 } else {
623 if (server->namelen == 0 || server->namelen > NFS2_MAXNAMLEN) 624 if (server->namelen == 0 || server->namelen > NFS2_MAXNAMLEN)
624 server->namelen = NFS2_MAXNAMLEN; 625 server->namelen = NFS2_MAXNAMLEN;
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 719464a04dda..ca20d3cc2609 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -290,6 +290,7 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss,
290 { NFS_MOUNT_NOAC, ",noac", "" }, 290 { NFS_MOUNT_NOAC, ",noac", "" },
291 { NFS_MOUNT_NONLM, ",nolock", "" }, 291 { NFS_MOUNT_NONLM, ",nolock", "" },
292 { NFS_MOUNT_NOACL, ",noacl", "" }, 292 { NFS_MOUNT_NOACL, ",noacl", "" },
293 { NFS_MOUNT_NORDIRPLUS, ",nordirplus", "" },
293 { 0, NULL, NULL } 294 { 0, NULL, NULL }
294 }; 295 };
295 const struct proc_nfs_info *nfs_infop; 296 const struct proc_nfs_info *nfs_infop;