linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* What means "top level" in "btrfs subvolume list" ?
@ 2017-09-30 11:57 Goffredo Baroncelli
  2017-09-30 14:53 ` Peter Grandi
  2017-10-01  7:49 ` Andrei Borzenkov
  0 siblings, 2 replies; 5+ messages in thread
From: Goffredo Baroncelli @ 2017-09-30 11:57 UTC (permalink / raw)
  To: linux-btrfs

(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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-10-02 19:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-30 11:57 What means "top level" in "btrfs subvolume list" ? Goffredo Baroncelli
2017-09-30 14:53 ` Peter Grandi
2017-09-30 16:38   ` Andrei Borzenkov
2017-10-02 19:07   ` Goffredo Baroncelli
2017-10-01  7:49 ` Andrei Borzenkov

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).