Re: file metadata via fs API (was: [GIT PULL] Filesystem Information)
From: Lennart Poettering
Date: Fri Aug 14 2020 - 04:06:16 EST
On Mi, 12.08.20 11:18, Linus Torvalds (torvalds@xxxxxxxxxxxxxxxxxxxx) wrote:
> On Tue, Aug 11, 2020 at 5:05 PM David Howells <dhowells@xxxxxxxxxx> wrote:
> > 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 Poettering, Berlin