|
|
Subscribe / Log in / New account

The Btrfs inode-number epic (part 2: solutions)

The Btrfs inode-number epic (part 2: solutions)

Posted Aug 24, 2021 19:26 UTC (Tue) by zev (subscriber, #88455)
In reply to: The Btrfs inode-number epic (part 2: solutions) by neilbrown
Parent article: The Btrfs inode-number epic (part 2: solutions)

I don't *know" what inode number is presented to stat(), but I wouldn't be at all surprised to find that objects in .zfs/snapshot have the SAME inode number as the corresponding object in the main filesystem. If you ask some tool like tar to look at the main filesystem as well as a snapshot, it might get confused. But them, I suspect it is really quite easy to avoid doing that.
From a quick check, it appears that zfs does indeed present the same inode numbers in snapshots as it does in the main filesystem (on FreeBSD, anyway, though presumably on other kernels as well). Though yes, as hinted at elsewhere, it omits the magic .zfs directories from directory listings (getdents, etc.), so you'll only ever end up referencing a path in a snapshot if you really ask for it; basic directory recursion by find, tar, etc. will skip right over it without ever knowing it's there.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds