The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=7773d509d823c2620abb831e2a2ff7ffe174904f
commit 7773d509d823c2620abb831e2a2ff7ffe174904f Author: Rick Macklem <rmack...@freebsd.org> AuthorDate: 2025-01-14 22:11:06 +0000 Commit: Rick Macklem <rmack...@freebsd.org> CommitDate: 2025-01-28 22:38:52 +0000 fs: Add new VFCF_xxx flags for va_filerev Richard Kojedzinszky <rich...@kojedz.in> reported a problem via email, where the Linux NFSv4.2 client did not detect a change in a directory on a FreeBSD NFSv4.2 server. Adding support for the NFSv4.2 change_attr_type attribute seems to have fixed the problem. This requires that the server file system indicate if it increments va_filerev by one, since that file attribute is used for the NFSv4.2 change attribute. Fuse requires an indication that va_filerev is based on ctime. This patch adds VFCF_FILEREVINC and VFCF_FILEREVCT to indicate this. A future patch to the NFS server will use these flags. (cherry picked from commit 1cd455f39d886f27c33f7726f79fc4cc566da7b3) --- sys/sys/mount.h | 2 ++ sys/ufs/ffs/ffs_vfsops.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 7a85d94cb4f2..efe230f518f8 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -687,6 +687,8 @@ struct ovfsconf { #define VFCF_SBDRY 0x01000000 /* Stop at Boundary: defer stop requests to kernel->user (AST) transition */ #define VFCF_FILEMOUNT 0x02000000 /* allow mounting files */ +#define VFCF_FILEREVINC 0x04000000 /* va_filerev is incr. by one */ +#define VFCF_FILEREVCT 0x08000000 /* va_filerev is set to ctime */ typedef uint32_t fsctlop_t; diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 16a955bc7f6d..be24ba1e733a 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -117,7 +117,7 @@ static struct vfsops ufs_vfsops = { .vfs_susp_clean = process_deferred_inactive, }; -VFS_SET(ufs_vfsops, ufs, 0); +VFS_SET(ufs_vfsops, ufs, VFCF_FILEREVINC); MODULE_VERSION(ufs, 1); static b_strategy_t ffs_geom_strategy;