←back to thread

68 points ingve | 2 comments | | HN request time: 0.478s | source
Show context
ChuckMcM ◴[] No.43712948[source]
A very long time ago when I was at Sun we struggled with this. Sun added something called the 'translucent file system' among other things. There was briefly a thought of changing stat so that it would report "data" being held by the file (all of the things written to it), "extents" of the file (all of the blocks it was taking up on disk), and "size" which accounted for partial blocks and was backwards compatible, and "flags" which included "encrypted" (yes/no), "sparse" (yes/no), "fixed" (yes/no), and at least one and possibly others that I can't remember. It served to illustrate how complex the question of file systems had become beyond the original "SAM" and "ISAM" methods from mainframes. It was either Guy Harris or Jon Livesey who pointed out that checking a damaged version of a file system with all of those capabilities as first class attributes was probably not NP complete. :-).
replies(2): >>43713443 #>>43713965 #
cryptonector ◴[] No.43713443[source]
stat() is a dumpster. It causes serious performance problems for things like Lustre. It should get replaced with a system call that takes a set of metadata items you want and returns just those items. Of course, that's easy to say, but it will take forever and a day to make sure all things are using it that should.
replies(1): >>43713839 #
1. nolist_policy ◴[] No.43713839[source]
Linux has statx() since 8 years.

> The mask argument to statx() is used to tell the kernel which fields the caller is interested in.

https://manpages.debian.org/bookworm/manpages-dev/statx.2.en...

replies(1): >>43717679 #
2. cryptonector ◴[] No.43717679[source]
Ah, interesting, TIL. Thanks!