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

From: Linus Torvalds
Date: Fri Aug 14 2020 - 13:05:35 EST

On Wed, Aug 12, 2020 at 8:53 PM Jeffrey E Altman <jaltman@xxxxxxxxxxxx> wrote:
> For the AFS community, fsinfo offers a method of exposing some server
> and volume properties that are obtained via "path ioctls" in OpenAFS and
> AuriStorFS. Some example of properties that might be exposed include
> answers to questions such as:

Note that several of the questions you ask aren't necessarily
mount-related at all.

Doing it by mount ends up being completely the wrong thing.

For example, at a minimum, these guys may well be per-directory (or
even possibly per-file):

> * where is a mounted volume hosted? which fileservers, named by uuid
> * what is the block size? 1K, 4K, ...
> * are directories just-send-8, case-sensitive, case-preserving, or
> case-insensitive?
> * if not just-send-8, what character set is used?
> * if Unicode, what normalization rules? etc.
> * what volume security policy (authn, integ, priv) is assigned, if any?
> * what is the replication policy, if any?
> * what is the volume encryption policy, if any?

and trying to solve this with some kind of "mount info" is pure garbage.

Honestly, I really think you may want an extended [f]statfs(), not
some mount tracking.