On 07/08/2014 04:43 AM, Duncan wrote:
> The remaining problem to deal with is that if say the root subvol (id=5) 
> is mounted rw,subvolmode=rw, while a subvolume below it is mounted 
> subvolmode=ro, then what happens if someone tries to make an edit in the 
> portion of the filesystem visible in the subvolume, but from the parent, 
> id=5/root in this case?  Obviously if that modification is allowed from 
> the parent, it'll change what's visible in the child subvolume as well, 
> which would be rather unexpected.

The ro/rw status is a subvolume flag.
So if a subvolume is marked rw (or ro), is writable (not writable) in all
the mount(S)
This flag is not inheritable.

What could be strange is the following:

      # mount -o subvolid=5,rw /dev/sda1 /mnt/btrfs-root
      # btrfs subvol create /mnt/btrfs-root/subvolname/
then
      # touch /mnt/btrfs-root/subvolname/touch-file

succeeds; but

      # mount -o subvolid=5,rw /dev/sda1 /mnt/btrfs-root
      # btrfs subvol create /mnt/btrfs-root/subvolname/
      # mount -o subvol=subvolname,ro /dev/sda1 /mnt/btrfs-subvol
then
      # touch /mnt/btrfs-root/subvolname/touch-file2

fails.




-- 
gpg @keyserver.linux.it: Goffredo Baroncelli (kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to