All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Anton Mitterer <calestyo@scientia.net>
To: Chris Murphy <lists@colorremedies.com>, "S.J." <sorry@anonym.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: subvols, ro- and bind mounts - how?
Date: Sat, 12 Dec 2015 21:27:58 +0100	[thread overview]
Message-ID: <1449952078.6742.10.camel@scientia.net> (raw)
In-Reply-To: <CAJCQCtR+8V5Kp6kYD3SsOpBQWi8_hc=m-FoumSkb5b4cQf0MBQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1703 bytes --]

On Thu, 2015-12-10 at 19:32 -0700, Chris Murphy wrote:
> That seems due for a revision because I do rw, ro, rw, rw, ro mounts
> in sequence and they stick fine. In fact they stick with the same
> subvolume.
> 
> [root@f23m ]# mount /dev/sda7 /mnt/1 -o subvol=home
> [root@f23m ]# mount /dev/sda7 /mnt/2 -o subvol=home,ro
> [root@f23m ]# mount /dev/sda7 /mnt/3 -o subvol=home
> [root@f23m ]# mount
> [...snip...]
> /dev/sda7 on /mnt/1 type btrfs
> (rw,relatime,seclabel,ssd,space_cache,subvolid=258,subvol=/home)
> /dev/sda7 on /mnt/2 type btrfs
> (ro,relatime,seclabel,ssd,space_cache,subvolid=258,subvol=/home)
> /dev/sda7 on /mnt/3 type btrfs
> (rw,relatime,seclabel,ssd,space_cache,subvolid=258,subvol=/home)


Not sure what you mean with "stick" here... I'd say the above has
simply the following semantics:
- the default for mounts is rw
- thus /mnt/1 and /mnt/3 are rw, and 3 isn't rw, because 1 was

In other words, if you change that to the following:
# mount /dev/sda7 /mnt/1 -o subvol=home,ro
# mount /dev/sda7 /mnt/2 -o subvol=home,ro
# mount /dev/sda7 /mnt/3 -o subvol=home
I'd expect that you get
ro
ro
rw

At least based on how I understood the whole system now.
That was actually my question here:
Q: In other words does mounting the same subvol *again* behave like --
bind mounts, i.e. the further mounts would get the options from the
first mount?

And I guess the A:(nswer) is: no, mount options affect the respective
mountpoint (including any nested subvols below that) only (except of
course it's a --bind mount.


If one of the devs could confirm that semantics, I may find some time
to update the wiki accordingly.


Cheers,
Chris.

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5313 bytes --]

  reply	other threads:[~2015-12-12 20:28 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24  4:56 subvols and parents - how? Christoph Anton Mitterer
2015-11-24  8:29 ` Duncan
2015-11-24 21:25   ` Christoph Anton Mitterer
2015-11-24 21:55     ` Hugo Mills
2015-11-24 23:20       ` Christoph Anton Mitterer
2015-11-24 23:30         ` Hugo Mills
2015-11-24 23:38           ` Christoph Anton Mitterer
2015-11-27  1:02     ` Duncan
2015-12-09  4:36       ` Christoph Anton Mitterer
2015-12-09 10:53         ` Duncan
2015-12-09 19:04           ` Austin S Hemmelgarn
2015-12-10  3:56             ` Duncan
2015-12-10 12:31               ` Austin S Hemmelgarn
2015-12-12 19:58           ` Christoph Anton Mitterer
2015-11-27  2:02     ` Duncan
2015-12-09  4:38       ` Christoph Anton Mitterer
2015-12-09 11:26         ` Duncan
2015-12-10 21:13           ` subvols, ro- and bind mounts " Christoph Anton Mitterer
2015-12-10 22:36             ` S.J.
2015-12-10 23:41               ` Christoph Anton Mitterer
2015-12-11  2:32               ` Chris Murphy
2015-12-12 20:27                 ` Christoph Anton Mitterer [this message]
2015-12-12  2:32           ` subvols and parents " Christoph Anton Mitterer
2015-12-12  3:07             ` Christoph Anton Mitterer
2015-12-12 10:20             ` Duncan
2015-12-09 14:49       ` Axel Burri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1449952078.6742.10.camel@scientia.net \
    --to=calestyo@scientia.net \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.com \
    --cc=sorry@anonym.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.