diff options
author | Steve Dickson <steved@redhat.com> | 2007-03-29 13:08:06 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-03-29 13:08:06 +1000 |
commit | 7182bd393bab963cec65f2688b09e3554ef5a721 (patch) | |
tree | a1f7c1d887df7a6f2992ab1ddca725665c45ccd3 | |
parent | f1e07c06652eb5cae1ce028cad8cd35e59f32f57 (diff) | |
download | nfs-utils-7182bd393bab963cec65f2688b09e3554ef5a721.tar.gz nfs-utils-7182bd393bab963cec65f2688b09e3554ef5a721.tar.xz nfs-utils-7182bd393bab963cec65f2688b09e3554ef5a721.zip |
mount.nfs - nordirplus option
From: Steve Dickson <steved@redhat.com>
Adds the -o nordirplus mount option that will disable
NFS clients from using the READDIRPLUS RPC.
Signed-off-by: Steve Dickson <steved@redhat.com>
Signed-off-by: Neil Brown <neilb@suse.de>
-rw-r--r-- | utils/mount/nfs.man | 5 | ||||
-rw-r--r-- | utils/mount/nfs_mount.h | 1 | ||||
-rw-r--r-- | utils/mount/nfsmount.c | 5 |
3 files changed, 11 insertions, 0 deletions
diff --git a/utils/mount/nfs.man b/utils/mount/nfs.man index 8abdb83..673556c 100644 --- a/utils/mount/nfs.man +++ b/utils/mount/nfs.man @@ -283,6 +283,11 @@ support UDP. .TP 1.5i .I udp Mount the NFS filesystem using the UDP protocol. +.TP 1.5i +.I nordirplus +Disables NFSv3 READDIRPLUS RPCs. Use this option when +mounting servers that don't support or have broken +READDIRPLUS implementations. .P All of the non-value options have corresponding nooption forms. For example, nointr means don't allow file operations to be diff --git a/utils/mount/nfs_mount.h b/utils/mount/nfs_mount.h index a8d1f1a..4a061d8 100644 --- a/utils/mount/nfs_mount.h +++ b/utils/mount/nfs_mount.h @@ -63,6 +63,7 @@ struct nfs_mount_data { #define NFS_MOUNT_BROKEN_SUID 0x0400 /* 4 */ #define NFS_MOUNT_NOACL 0x0800 /* 4 */ #define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 */ +#define NFS_MOUNT_NORDIRPLUS 0x4000 /* 5 */ /* security pseudoflavors */ diff --git a/utils/mount/nfsmount.c b/utils/mount/nfsmount.c index 776ef64..815064a 100644 --- a/utils/mount/nfsmount.c +++ b/utils/mount/nfsmount.c @@ -800,6 +800,10 @@ parse_options(char *old_opts, struct nfs_mount_data *data, data->flags &= ~NFS_MOUNT_NOACL; if (!val) data->flags |= NFS_MOUNT_NOACL; + } else if (!strcmp(opt, "rdirplus")) { + data->flags &= ~NFS_MOUNT_NORDIRPLUS; + if (!val) + data->flags |= NFS_MOUNT_NORDIRPLUS; #endif } else { bad_option: @@ -983,6 +987,7 @@ nfsmount(const char *spec, const char *node, int *flags, #endif #if NFS_MOUNT_VERSION >= 5 printf("sec = %u ", data.pseudoflavor); + printf("readdirplus = %d ", (data.flags & NFS_MOUNT_NORDIRPLUS) != 0); #endif printf("\n"); #endif |