diff options
author | Karel Zak | 2017-06-20 12:46:02 +0200 |
---|---|---|
committer | Karel Zak | 2017-06-20 12:46:02 +0200 |
commit | 9b76b0e98b7f9e8a7ea1c2b89cf9a73b89fd6bcb (patch) | |
tree | 31723bd29fb5946a5b47d2f93df1499b33cbb5a9 /sys-utils/Makemodule.am | |
parent | dmesg: fragment concatenation (diff) | |
download | kernel-qcow2-util-linux-9b76b0e98b7f9e8a7ea1c2b89cf9a73b89fd6bcb.tar.gz kernel-qcow2-util-linux-9b76b0e98b7f9e8a7ea1c2b89cf9a73b89fd6bcb.tar.xz kernel-qcow2-util-linux-9b76b0e98b7f9e8a7ea1c2b89cf9a73b89fd6bcb.zip |
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>
Diffstat (limited to 'sys-utils/Makemodule.am')
0 files changed, 0 insertions, 0 deletions