Re: RFC: checking file systems support UF_HIDDEN, UF_SYSTEM
Date: Thu, 03 Jul 2025 09:51:03 UTC
On Thu, Jul 03, 2025 at 10:57:15AM +0200, Olivier Certner wrote: > > I suggest adding more _PC_XXX constants and use VOP_PATHCONF() to get the > > property of the specific mount point. You might query it on the root > > vnode and cache it somewhere. Also this information would become > > available to userspace due to pathconf(2). > > That works and is probably the path of least resistance. An alternative would be to export this information through statfs()/statvfs(), as probably no (sane) filesystem would support these file attributes only in some directories (in other words, this information is per-mount). However, to stay backwards-compatible, that would mean either defining new MNT_* flags or using some spares in 'struct statfs', and translating these into a new report flag for statvfs(). > It is not the right usage of the MNT_ flags. They are for feature controlling, not for the feature reporting. VOP_PATHCONF() is exactly for reporting some mnt features. Also, this namespace should not be used frivolously, we already had to extend flags to 64bit, and again we are not too far from exhausting it.