On 2012-11-19 22:38, Mark Shellenbaum wrote:
The parent pointer is a single 64 bit quantity that can't track all the possible parents a hard linked file could have.
I believe it is inode number of the parent, or similar to that - and an available inode number can get recycled and used by newer objects?
Now when the original dir.2 object number is recycled you could have a situation where the parent pointer for points to a non-directory. The ZPL never uses the parent pointer internally. It is only used by zfs diff and other utility code to translate object numbers to full pathnames. The ZPL has always set the parent pointer, but it is more for debugging purposes.
Thanks, very interesting! Now that this value is used and somewhat exposed to users, isn't it time to replace it with some nvlist or a different object type that would hold all such parent pointers for hardlinked files (perhaps, when moving from a single integer to nvlist if we have more than one link from a directory to a file inode)? At least, it would make zdiff more consistent and reliable, though at a cost of some complexity... inodes do already track their reference counts. If we keep track of one referrer explicitly, why not track them all? Thanks for info, //Jim _______________________________________________ zfs-discuss mailing list firstname.lastname@example.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss