Date: Wed, 2 Jul 2025 14:02:14 -0700 From: Rick Macklem <rick.macklem@gmail.com> To: FreeBSD CURRENT <freebsd-current@freebsd.org> Subject: RFC: checking file systems support UF_HIDDEN, UF_SYSTEM Message-ID: <CAM5tNy5eoY5f-fo9BKc4v34XKXF6%2B6Ae7Zpq=FH7owaSRYSHmw@mail.gmail.com>
index | next in thread | raw e-mail
Hi,
I am implementing the "hidden" and "system" attributes for
NFSv4 using UF_HIDDEN and UF_SYSTEM.
In a couple of places in the code, I need to know if a file
system supports these flags.
I can think of two ways to do this.
#1 - Create a new VFCF_HIDSYS flag that is set via VFS_SET()
for file systems that support the UF_HIDDEN and UF_SYSTEM
flags and test for that flag being set.
or
#2 - Write it this way...
if (strcmp(vp->v_mount->mnt_vfc->vfc_name, "zfs") != 0 ||
strcmp(vp->v_mount->mnt_vfc->vfc_name, "ufs") != 0 ||
strcmp(vp->v_mount->mnt_vfc->vfc_name, "msdosfs") != 0 ||
strcmp(vp->v_mount->mnt_vfc->vfc_name, "tmpfs") != 0)
Which do you think is preferable (or do you have another idea)?
Thanks for any comments, rick
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAM5tNy5eoY5f-fo9BKc4v34XKXF6%2B6Ae7Zpq=FH7owaSRYSHmw>
