|
|
Log in / Subscribe / Register

XFS parent pointers

XFS parent pointers

Posted May 8, 2018 22:27 UTC (Tue) by dgc (subscriber, #6611)
In reply to: XFS parent pointers by nix
Parent article: XFS parent pointers

> This doesn't mean an extra block allocated per file, right?

In most cases there will be no extra allocation - the xattr will easily fit inside the inode for typical single parent, short name files on a default 512 byte inode filesystem. It's not until you have multiple hard links or filenames > 100 bytes that the xattrs will tend to go out of line. Or you have lots of other xattrs, in which case they're at risk of being moved out of line, anyway. If you're really worried about xattrs being kept in line, then you can always format the filesystem with 1kB or 2kB inodes....

-Dave.


to post comments

XFS parent pointers

Posted May 9, 2018 15:51 UTC (Wed) by nix (subscriber, #2304) [Link] (1 responses)

Oh right. I'm only worrying because I'm hacking up a replacement for GNU Stow that uses hardlinks where possible, unstowing by comparing the st_dev/st_ino of appropriately-located files in the target and stow tree, to reduce the visible behaviour change GNU stow and graft can cause with their huge symlink farms (since lots of programs care whether things are symlinks or not but almost none check their own read-only files to see what their link count is). If this works, systems that use it would end up with hundreds of thousands of files with link count 2.

However, I suspect that for your average file, two hardlinks is fine for inline storage of the parent pointers as well (inodes aren't *that* small). If a file has ten twenty or fifty hardlinks, I'd frankly *expect* parent pointers to be moved out of line. :)

XFS parent pointers

Posted May 21, 2018 1:54 UTC (Mon) by njs (subscriber, #40338) [Link]

FYI in case you're looking for other projects that make similar demands, conda is also a heavy user of hardlinks, for a somewhat similar use case.


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