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

From: Miklos Szeredi
Date: Wed Aug 12 2020 - 09:09:48 EST


On Wed, Aug 12, 2020 at 12:14 PM Karel Zak <kzak@xxxxxxxxxx> wrote:

> For example, by fsinfo(FSINFO_ATTR_MOUNT_TOPOLOGY) you get all
> mountpoint propagation setting and relations by one syscall,

That's just an arbitrary grouping of attributes.

You said yourself, that what's really needed is e.g. consistent
snapshot of a complete mount tree topology. And to get the complete
topology FSINFO_ATTR_MOUNT_TOPOLOGY and FSINFO_ATTR_MOUNT_CHILDREN are
needed for *each* individual mount. The topology can obviously change
between those calls.

So there's no fundamental difference between getting individual
attributes or getting attribute groups in this respect.

> It would be also nice to avoid some strings formatting and separators
> like we use in the current mountinfo.

I think quoting non-printable is okay.

> I can imagine multiple values separated by binary header (like we already
> have for watch_notification, inotify, etc):

Adding a few generic binary interfaces is okay. Adding many
specialized binary interfaces is a PITA.

Thanks,
Miklos