Harald Hoyer 0723a0473f btrfs: allow mounting btrfs subvolumes with different ro/rw options
Given the following /etc/fstab entries:

/dev/sda3 /mnt/foo btrfs subvol=foo,ro 0 0
/dev/sda3 /mnt/bar btrfs subvol=bar,rw 0 0

you can't issue:

$ mount /mnt/foo
$ mount /mnt/bar

You would have to do:

$ mount /mnt/foo
$ mount -o remount,rw /mnt/foo
$ mount --bind -o remount,ro /mnt/foo
$ mount /mnt/bar

or

$ mount /mnt/bar
$ mount --rw /mnt/foo
$ mount --bind -o remount,ro /mnt/foo

With this patch you can do

$ mount /mnt/foo
$ mount /mnt/bar

$ cat /proc/self/mountinfo
49 33 0:41 /foo /mnt/foo ro,relatime shared:36 - btrfs /dev/sda3 rw,ssd,space_cache
87 33 0:41 /bar /mnt/bar rw,relatime shared:74 - btrfs /dev/sda3 rw,ssd,space_cache

Signed-off-by: Chris Mason <clm@fb.com>
2014-04-10 13:32:50 -07:00
..
2014-01-28 13:19:50 -08:00
2014-04-06 17:39:30 -07:00
2014-04-06 17:39:30 -07:00
2013-11-11 22:03:19 -05:00
2008-09-25 11:04:06 -04:00
2013-03-14 14:57:10 -04:00
2013-02-01 14:24:23 -05:00
2014-03-10 15:16:51 -04:00
2014-03-10 15:15:51 -04:00
2014-03-10 15:15:51 -04:00
2014-01-29 07:06:27 -08:00
2014-01-29 07:06:27 -08:00
2014-04-07 09:08:41 -07:00