The branch main has been updated by rmacklem:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=1cd455f39d886f27c33f7726f79fc4cc566da7b3

commit 1cd455f39d886f27c33f7726f79fc4cc566da7b3
Author:     Rick Macklem <rmack...@freebsd.org>
AuthorDate: 2025-01-14 22:11:06 +0000
Commit:     Rick Macklem <rmack...@freebsd.org>
CommitDate: 2025-01-14 22:11:06 +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.
    
    Reviewed by:    asomers, kib
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D48436
---
 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 ac84c99ac74b..6715c55d7a6d 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -685,6 +685,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 2bfee6a6145d..9e94d368d7c9 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;

Reply via email to