diff options
| author | Niels de Vos <ndevos@redhat.com> | 2016-01-03 12:57:29 +0100 | 
|---|---|---|
| committer | Niels de Vos <ndevos@redhat.com> | 2016-01-24 03:43:14 -0800 | 
| commit | a5b352a703574b894e0b7cdbf16bea637dab75e8 (patch) | |
| tree | 88752a33e8fca68d4b111e12897e56eb1340ee3d | |
| parent | e67712c06b64fb659824b3f79164f2789693acee (diff) | |
fuse: pass standard mount options to the kernel
Some of the default mount options were made invalid with glusterfs-3.6.
The /sbin/mount.glusterfs script changed heavily and now requires all
valid mount options to be listed. Earlier versions (glusterfs-3.5 and
before) passed all unknown mount options on to fuse.
With this change, all mount options from 'man 8 mount' are explicitly
included in the /sbin/mount.glusterfs script. Some of the options are
marked with TODO, these are not commonly used and may require some
additional support in Gluster/FUSE too.
BUG: 1294809
Change-Id: Ic312140d7318b54523996bb08772ff065af7eb27
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/13166
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
| -rwxr-xr-x | xlators/mount/fuse/utils/mount.glusterfs.in | 24 | 
1 files changed, 23 insertions, 1 deletions
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in index 7f314da69ec..32168df5a33 100755 --- a/xlators/mount/fuse/utils/mount.glusterfs.in +++ b/xlators/mount/fuse/utils/mount.glusterfs.in @@ -472,6 +472,9 @@ with_options()              [ -z "$fuse_mountopts" ] || fuse_mountopts="$fuse_mountopts,"              fuse_mountopts="${fuse_mountopts}$key=\"$value\""              ;; +        x-*) +            # comments or userspace application-specific options, drop them +            ;;          *)              warn "Invalid option: $key"              exit 1 @@ -516,11 +519,30 @@ without_options()           # "mount -t glusterfs" sends this, but it's useless.          "rw")              ;; +         # TODO: not sure how to handle this yet +        "async"|"sync"|"dirsync"|\ +        "mand"|"nomand"|\ +        "silent"|"loud"|\ +        "iversion"|"noiversion"|\ +        "nofail") +            warn "mount option '${option}' is not handled (yet?)" +            ;; +         # standard mount options to pass to the kernel +        "atime"|"noatime"|"diratime"|"nodiratime"|\ +        "relatime"|"norelatime"|\ +        "strictatime"|"nostrictatime"|"lazyatime"|"nolazyatime"|\ +        "dev"|"nodev"|"exec"|"noexec"|"suid"|"nosuid") +            [ -z "$fuse_mountopts" ] || fuse_mountopts="$fuse_mountopts," +            fuse_mountopts="${fuse_mountopts}${option}" +            ;;           # these ones are interpreted during system initialization -        "noauto") +        "auto"|"noauto")              ;;          "_netdev")              ;; +        x-*) +            # comments or userspace application-specific options, drop them +            ;;          *)              warn "Invalid option $option";              exit 1  | 
