git: 0f1f6d18d722 - stable/13 - fs: Add new VFCF_xxx flags for va_filerev
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 28 Jan 2025 22:43:55 UTC
The branch stable/13 has been updated by rmacklem:
URL: https://cgit.FreeBSD.org/src/commit/?id=0f1f6d18d722834bc90b701dbcf4d924f2075310
commit 0f1f6d18d722834bc90b701dbcf4d924f2075310
Author: Rick Macklem <rmacklem@FreeBSD.org>
AuthorDate: 2025-01-14 22:11:06 +0000
Commit: Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2025-01-28 22:43:21 +0000
fs: Add new VFCF_xxx flags for va_filerev
Richard Kojedzinszky <richard@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 90e68e560b2f..6e1da7ad12fe 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -653,6 +653,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 62d63210531a..a77784b32d78 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;