zfs/cmd
Brian Behlendorf 590509b75e Add MS_MANDLOCK mount failure message
Commit torvalds/linux@9e8925b6 allowed for kernels to be built
without support for mandatory locking (MS_MANDLOCK).  This will
result in 'zfs mount' failing when the nbmand=on property is set
if the kernel is built without CONFIG_MANDATORY_FILE_LOCKING.

Unfortunately we can not reliably detect prior to the mount(2) system
call if the kernel was built with this support.  The best we can do
is check if the mount failed with EPERM and if we passed 'mand'
as a mount option and then print a more useful error message. e.g.

  filesystem 'tank/fs' has the 'nbmand=on' property set, this mount
  option may be disabled in your kernel.  Use 'zfs set nbmand=off'
  to disable this option and try to mount the filesystem again.

Additionally, switch the default error message case to use
strerror() to produce a more human readable message.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4729
Closes #6199
2017-06-09 14:05:15 -07:00
..
arc_summary Make arc_summary.py and dbufstat.py compatible with python3 2016-01-29 09:52:12 -08:00
arcstat Update arcstat.py to remove deprecated rmis reference. 2015-12-23 17:29:34 -08:00
dbufstat Make arc_summary.py and dbufstat.py compatible with python3 2016-01-29 09:52:12 -08:00
fsck_zfs Add /sbin/fsck.zfs helper 2013-01-09 16:54:58 -08:00
mount_zfs Add MS_MANDLOCK mount failure message 2017-06-09 14:05:15 -07:00
vdev_id vdev_id: fix failure due to multipath -l bug 2017-06-09 14:05:15 -07:00
zdb zdb: segfault in dump_bpobj_subobjs() 2017-06-09 14:05:15 -07:00
zed Rework zed_notify_email for configurable PROG/OPTS 2015-07-30 11:52:56 -07:00
zfs Allow ZVOL bookmarks to be listed recursively 2017-06-09 14:05:15 -07:00
zhack Support parallel build trees (VPATH builds) 2015-07-17 13:42:51 -07:00
zinject Support parallel build trees (VPATH builds) 2015-07-17 13:42:51 -07:00
zpios Support parallel build trees (VPATH builds) 2015-07-17 13:42:51 -07:00
zpool Use udev for partition detection 2016-05-06 18:22:34 -04:00
zstreamdump Support parallel build trees (VPATH builds) 2015-07-17 13:42:51 -07:00
ztest Add dbgmsg kstat 2015-09-04 16:08:14 -07:00
zvol_id Support parallel build trees (VPATH builds) 2015-07-17 13:42:51 -07:00
Makefile.am Install arc_summary.py 2015-03-03 13:38:17 -08:00