(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
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to