[Bug 2329] "mount -o remount,ro /mnt/img" not working properly
bugzilla at busybox.net
bugzilla at busybox.net
Mon Jan 3 07:57:08 UTC 2011
https://bugs.busybox.net/show_bug.cgi?id=2329
--- Comment #1 from Denys Vlasenko <vda.linux at googlemail.com> ---
On "mount -o remount,ro /path", "standard" mount does:
mount("/lib", "/mnt/tmp", 0x7f5e8d55e0c0,
MS_MGC_VAL|MS_RDONLY|MS_REMOUNT|MS_BIND, NULL) = 0
Whereas busybox mount does:
mount("/dev/mapper/vg_dhcp25227-lv_root", "/mnt/tmp", 0x6e8e9a,
MS_RDONLY|MS_REMOUNT|MS_SILENT|0x200000, "seclabel,barrier=1,data=ordered") =
-1 EBUSY
No wonder it fails - MS_BIND bit is missing.
The difference comes from the fact that "standard" mount consults /etc/mtab,
sees "/lib /mnt/tmp none rw,bind 0 0" line there, understands that it's a bind
mount, and uses correct flags; whereas busybox mount looks into /proc/mounts,
sees "/dev/mapper/vg_dhcp25227-lv_root /mnt/tmp ext4
rw,seclabel,relatime,barrier=1,data=ordered 0 0" line and there is no way for
it to understand that it's a bind mount (also, it can't figure out correct 1st
arg, but that may be not needed for -o remount).
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list