Re: RFC: checking file systems support UF_HIDDEN, UF_SYSTEM

From: Olivier Certner <olce_at_freebsd.org>
Date: Thu, 03 Jul 2025 08:57:15 UTC
> 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().

Regards.

-- 
Olivier Certner