From: Karel Zak Date: Wed, 6 Apr 2011 16:39:21 +0000 (-0400) Subject: mount: add --enable-libmount-mount X-Git-Tag: nfs-utils-1-2-4-rc7 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=a99269230a0e77e7bed4fa31c9547f0d61c7f206;hp=a99269230a0e77e7bed4fa31c9547f0d61c7f206;p=nfs-utils.git mount: add --enable-libmount-mount This patch allows to link mount.nfs with libmount from util-linux >= v2.19. The new libmount based code is enabled by CONFIG_LIBMOUNT and is stored in mount_libmount.c. The old code is not affected by this change. The libmount does not have officially stable API yet, so the --enable-libmount-mount is marked as experimental in the configure help output. The ./configure option is the same as we use in util-linux to enable support for libmount in mount(8). The addr= (and some other options necessary for remount/umount) are stored to /etc/mtab or to /dev/.mount/utab. The utab file is *private* libmount file. It's possible that some mount options (for example user=) will be moved to kernel, so the utab will not be necessary. About libmount: * supports systems without and with regular /etc/mtab * does not store VFS and FS mount options in userspace * manages user= option and evaluate permissions * parses VFS mount options and generate MS_* flags * parses /etc/{fstab,mtab}, /proc/mounts or /proc/self/mountinfo * long-term goal is to use the same code in all mount. helpers Note, use LIBMOUNT_DEBUG=0xffff mount.nfs foo:/path /path to debug the library. On systems with util-linux v2.19 the findmnt(8) command uses libmount to list all/selected mount points: $ findmnt /path $ findmnt --mtab /path the --mtab appends userspace mount options (e.g. user=) to the output. CC: Chuck Lever Signed-off-by: Karel Zak Signed-off-by: Steve Dickson ---