util-linux/libmount
Karel Zak 9b76b0e98b libmount: ignore "bind" from fstab on command line "remount"
The current code always apply all flags from /etc/fstab on remount.
Unfortunately remount+bind has special semantic and it's impossible
from command line to avoid interaction with the "bind" from fstab.

Example, fstab:

	/dev/sda1 /bar ext4 defaults 0 1
	/bar /foo none bind 0 0

Command line:

    # mount /foo -o remount,rw

produces:

    mount(... MS_REMOUNT|MS_BIND ) syscall

This changes the per-mountpoint (VFS) ro flag to rw, but doesn't
change the filesystem itself.

This patch forces libmount to ignore "bind" from fstab when "-o
remount" specified on command line. If you need remount+bind semantic
you have to specify the "bind" flag on command line. This allow to
differentiate between

    # mount /foo -o remount,bind,rw  --> mount(MS_REMOUNT|MS_BIND)
and

    # mount /foo -o remount,rw       --> mount(MS_REMOUNT)

Suggested-by: NeilBrown <neilb@suse.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-06-20 12:46:02 +02:00
..
docs libmount: (docs) add missing 'since' tags 2017-05-23 13:32:45 +02:00
python pylibmount: NULL terminate kwlist in Context_init 2017-06-07 17:25:12 -07:00
src libmount: ignore "bind" from fstab on command line "remount" 2017-06-20 12:46:02 +02:00
COPYING COPYING: fix grammar of referring phrase, and indicate location better 2013-10-08 15:38:39 +02:00
Makemodule.am build-sys: add pylibmount 2013-08-19 14:57:21 +02:00
mount.pc.in build-sys: use top-level directory for libmount rather than shlibs/mount 2011-06-09 21:59:52 +02:00