Here is structure of snapshots in openSUSE; all snapshots of root volume are created under /.snapshots subvolume:
linux-gtrk:/host/home/src/python-btrfs/examples # sudo mount -o ro,subvol=/ /dev/sda3 /mnt linux-gtrk:/host/home/src/python-btrfs/examples # ./show_directory_contents.py /mnt/ directory /mnt/@ tree 257 inum 256 inode generation 6 transid 315 size 72 nbytes 0 block_group 0 mode 40755 nlink 1 uid 0 gid 0 rdev 0 flags 0x0(none) inode ref index 0 name utf-8 .. ... dir item list hash 1921786525 size 1 dir item location (258 ROOT_ITEM -1) type DIR name utf-8 .snapshots ... linux-gtrk:/host/home/src/python-btrfs/examples # ./show_directory_contents.py /mnt/@/.snapshots/251/snapshot/ directory /mnt/@/.snapshots/251/snapshot/ tree 774 inum 256 inode generation 6 transid 15867 size 164 nbytes 0 block_group 0 mode 40755 nlink 1 uid 0 gid 0 rdev 0 flags 0x0(none) inode ref index 0 name utf-8 .. ... dir item list hash 1921786525 size 1 dir item location (258 ROOT_ITEM -1) type DIR name utf-8 .snapshots ... linux-gtrk:/host/home/src/python-btrfs/examples # Note that both directory items in /mnt/@ and /mnt/@/.snapshots/251/snapshot store the same tree ID for .snapshots item - 258. This causes grub2 btrfs driver loop - when it comes to /mnt/@/.snapshots/251/snapshot and looks for .snapshots it jumps back to /mnt/@/.snapshots tree. I see that in Linux kernel somehow distinguishes between both of them; I am not sure how it actually does it though. What on-disk information should we check to find out "orphaned" snapshot directory? TIA -andrei -- 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