FreeBSD: Add setting of the VFCF_FILEREV flag #16976
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Motivation and Context
FreeBSD has a recently created file system flag called VFCF_FILEREV that indicates
that the file system increments va_filerev by one for each change. This flag is used
by the FreeBSD NFSv4.2 server to return the correct value for the change_attr_type
NFSv4.2 attribute.
Since ZFS does increment va_filerev by one, set the flag.
Description
Set the VFCF_FILEREV flag, if it is defined.
The #ifdef was changed so that it handles multiple flags that might be defined
in the FreeBSD kernel.
How Has This Been Tested?
Tested in a FreeBSD system running a NFSv4.2 server and exporting a ZFS file system.
A packet trace showed that the correct value for change_attr_type was returned to
the client for a NFSv4.2 mount.
Types of changes
Checklist:
Signed-off-by
.