linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Goffredo Baroncelli <kreijack@inwind.it>
To: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: What means "top level" in "btrfs subvolume list" ?
Date: Sat, 30 Sep 2017 13:57:18 +0200	[thread overview]
Message-ID: <762acea0-3f55-4fc0-c5eb-604304152f3e@inwind.it> (raw)

(please ignore my previous email, because I wrote somewhere "top id" instead of "top level")
Hi All,

I am trying to figure out which means "top level" in the output of "btrfs sub list"


ghigo@venice:~$ sudo btrfs sub list /
[sudo] password for ghigo: 
ID 257 gen 548185 top level 5 path debian
ID 289 gen 418851 top level 257 path var/lib/machines
ID 299 gen 537230 top level 5 path boot
ID 532 gen 502364 top level 257 path tmp/test1
ID 533 gen 502277 top level 532 path tmp/test1/test2
ID 534 gen 502407 top level 257 path tmp/test1.snap
ID 535 gen 502363 top level 532 path tmp/test1/test3
ID 536 gen 502407 top level 257 path tmp/test1.snap2
ID 537 gen 537132 top level 5 path test
ID 538 gen 537130 top level 537 path test/sub1

The root filesystem is mounted as

mount -o subvol=debian ....


I think that "btrfs sub list" is buggy, and it outputs a "top level ID" equal to the "parent ID" (on the basis of the code). But I am still asking which would be the RIGHT "top level id". My Hypothesis, it should be the ID of the root subvolume ( or 5 if it is not mounted). So the output should be

 
ghigo@venice:~$ sudo btrfs sub list /
[sudo] password for ghigo: 
ID 257 gen 548185 top level 5 path debian
ID 289 gen 418851 top level 257 path var/lib/machines
ID 299 gen 537230 top level 5 path boot
ID 532 gen 502364 top level 257 path tmp/test1
ID 533 gen 502277 top level 257 path tmp/test1/test2
ID 534 gen 502407 top level 257 path tmp/test1.snap
ID 535 gen 502363 top level 257 path tmp/test1/test3
ID 536 gen 502407 top level 257 path tmp/test1.snap2
ID 537 gen 537132 top level 5 path test
ID 538 gen 537130 top level 5 path test/sub1


The subvolumes in the file system (mounted from /debian) are

/				ID = 5
/debian				ID = 257
/debian/var/lib/machines	ID = 289
/boot				ID = 299
/debian/tmp/test1		ID = 532
/debian/tmp/test1/test2		ID = 533
/debian/tmp/test1.snap		ID = 534
/debian/tmp/test1/test3		ID = 535
/debian/tmp/test1.snap2		ID = 536
/test				ID = 537
/test/sub1			ID = 538

BR
G.Baroncelli

-- 
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5

             reply	other threads:[~2017-09-30 11:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-30 11:57 Goffredo Baroncelli [this message]
2017-09-30 14:53 ` What means "top level" in "btrfs subvolume list" ? Peter Grandi
2017-09-30 16:38   ` Andrei Borzenkov
2017-10-02 19:07   ` Goffredo Baroncelli
2017-10-01  7:49 ` Andrei Borzenkov

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=762acea0-3f55-4fc0-c5eb-604304152f3e@inwind.it \
    --to=kreijack@inwind.it \
    --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;
as well as URLs for NNTP newsgroup(s).