←back to thread

68 points ingve | 5 comments | | HN request time: 0.622s | source
1. 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 #
2. 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 #
3. 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 #
4. delusional ◴[] No.43713965[source]
> checking a damaged version of a file system with all of those capabilities as first class attributes was probably not NP complete. :-).

I don't think I understand this statement. Did you mean it was undecidable, that it's NP complete, or did you mean it was solvable in polynomial time? The latter is what it currently parses as for me, but also what makes the least sense in the context of the comment.

5. cryptonector ◴[] No.43717679{3}[source]
Ah, interesting, TIL. Thanks!