From: Stephane Chazelas <stephane_chazelas@yahoo.fr>
To: linux-btrfs@vger.kernel.org
Subject: different st_dev's in one subvolume
Date: Thu, 2 Jun 2011 01:39:41 +0100 [thread overview]
Message-ID: <20110602003941.GA4319@yahoo.fr> (raw)
Hiya,
please consider this:
~# truncate -s1G ./a
~# mkfs.btrfs ./a
~# sudo mount -o loop ./a /mnt/1
~# cd /mnt/1
/mnt/1# ls
/mnt/1# btrfs sub c A
Create subvolume './A'
/mnt/1# btrfs sub c A/B
Create subvolume 'A/B'
/mnt/1# touch A/inA A/B/inB
/mnt/1# btrfs sub snap A A.snap
Create a snapshot of 'A' in './A.snap'
/mnt/1# zmodload zsh/stat
/mnt/1# zstat +device ./**/*
. 25
A 26
A/B 27
A/B/inB 27
A/inA 26
A.snap 28
A.snap/B 23
A.snap/inA 28
Why does A.snap/B have a different st_dev from A.snap's?
Also:
/mnt/1# touch A.snap/B/foo
touch: cannot touch `A.snap/B/foo': Permission denied
I can rmdir that directory OK though.
Also note that the permissions are different:
/mnt/1# ll A
total 0
drwx------ 1 root root 6 Jun 2 00:54 B/
-rw-r--r-- 1 root root 0 Jun 2 00:54 inA
/mnt/1# ll A.snap
total 0
drwxr-xr-x 1 root root 0 Jun 2 01:29 B/
-rw-r--r-- 1 root root 0 Jun 2 00:54 inA
If I create another snap of A or A.snap, the "B" in there gets
the same st_dev (23).
/mnt/1# btrfs sub create A.snap/B/C
Create subvolume 'A.snap/B/C'
ERROR: cannot create subvolume
# btrfs sub snap A.snap/B B.snap
ERROR: 'A.snap/B' is not a subvolume
--
Stephane
next reply other threads:[~2011-06-02 0:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-02 0:39 Stephane Chazelas [this message]
2011-06-02 0:59 ` different st_dev's in one subvolume Stephane Chazelas
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=20110602003941.GA4319@yahoo.fr \
--to=stephane_chazelas@yahoo.fr \
--cc=linux-btrfs@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox