Skip to content

Commit 3420571

Browse files
authored
FreeBSD: Add setting of the VFCF_FILEREV flag
The flag VFCF_FILEREV was recently defined in FreeBSD so that a file system could indicate that it increments va_filerev by one for each change. Since ZFS does do this, set the flag if defined for the kernel being built. This allows the NFSv4.2 server to reply with the correct change_attr_type attribute value. Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Rick Macklem <[email protected]> Closed #16976
1 parent 26e38ae commit 3420571

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

module/os/freebsd/zfs/zfs_vfsops.c

+6-4
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,14 @@ struct vfsops zfs_vfsops = {
144144
.vfs_quotactl = zfs_quotactl,
145145
};
146146

147+
VFS_SET(zfs_vfsops, zfs, VFCF_DELEGADMIN | VFCF_JAIL
147148
#ifdef VFCF_CROSS_COPY_FILE_RANGE
148-
VFS_SET(zfs_vfsops, zfs,
149-
VFCF_DELEGADMIN | VFCF_JAIL | VFCF_CROSS_COPY_FILE_RANGE);
150-
#else
151-
VFS_SET(zfs_vfsops, zfs, VFCF_DELEGADMIN | VFCF_JAIL);
149+
| VFCF_CROSS_COPY_FILE_RANGE
150+
#endif
151+
#ifdef VFCF_FILEREVINC
152+
| VFCF_FILEREVINC
152153
#endif
154+
);
153155

154156
/*
155157
* We need to keep a count of active fs's.

0 commit comments

Comments
 (0)