Skip to content

Commit

Permalink
fs: Add new VFCF_xxx flags for va_filerev
Browse files Browse the repository at this point in the history
Richard Kojedzinszky <[email protected]> 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
  • Loading branch information
Rick Macklem authored and Rick Macklem committed Jan 14, 2025
1 parent 9a2ae72 commit 1cd455f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions sys/sys/mount.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion sys/ufs/ffs/ffs_vfsops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1cd455f

Please sign in to comment.