Re: [rfc] new stat*fs-like syscall?

From: Jeff Garzik
Date: Fri Jun 25 2010 - 00:33:47 EST

On 06/25/2010 12:01 AM, Nick Piggin wrote:
So is "frsize" supposed to be the optimal block size, or what?
f_bsize AFAIKS should be filesystem allocation block size because
apparently some programs require it to calculate size of file on

If we can't change existing suboptimal legacy things, then let's
introduce new APIs that do the right thing. Apps that care will
eventually start using eg. a new syscall.

- statvfs(2) lacks f_type.

Is there anything more we should add here? Samba wants a capabilities
field, with things like sparse files, quotas, compression, encryption,
case preserving/sensitive.

It wouldn't be a bad idea, but then you could get into issues of what exactly the above flags mean. That said, I think it is better to have broad categories of features that may be slightly ill-defined than having nothing at all.

Yes it would be tricky. I don't want to add features that will just
be useless or go unused, but I don't want to change the syscall API
just to add f_flags, without looking at other possibilities.

It would be nice to separate capabilities and fixed parameters (block size) from statistics which change frequently (free space).

And are capabilities really suited to a C struct, at all? That seems more suited to a key/value type interface, a la NFSv4 attributes.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at