Re: file metadata via fs API (was: [GIT PULL] Filesystem Information)

From
Lennart Poettering <hidden>
Date
2020-08-14 08:06:18
Also in
linux-fsdevel, linux-security-module, lkml
Reply to
Linus Torvalds, 2020-08-12
On Mi, 12.08.20 11:18, Linus Torvalds (torvalds@linux-foundation.org) wrote:
On Tue, Aug 11, 2020 at 5:05 PM David Howells [off-list ref] wrote:
quoted
Well, the start of it was my proposal of an fsinfo() system call.
Ugh. Ok, it's that thing.

This all seems *WAY* over-designed - both your fsinfo and Miklos' version.

What's wrong with fstatfs()? All the extra magic metadata seems to not
really be anything people really care about.

What people are actually asking for seems to be some unique mount ID,
and we have 16 bytes of spare information in 'struct statfs64'.
statx() exposes a `stx_mnt_id` field nowadays. So that's easy and
quick to get nowadays. It's just so inefficient matching that up with
/proc/self/mountinfo then. And it still won't give you any of the fs
capability bits (time granularity, max file size, features, …),
because the kernel doesn't expose that at all right now.

OTOH I'd already be quite happy if struct statfs64 would expose
f_features, f_max_fsize, f_time_granularity, f_charset_case_handling
fields or so.

Lennart

--
Lennart Poettering, Berlin
Thread (88 messages) 88 messages, 14 authors, last reply 2020-08-21
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help