-
Notifications
You must be signed in to change notification settings - Fork 1.9k
FreeBSD: Add setting of the VFCF_FILEREV flag #16976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add 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.
amotin
approved these changes
Jan 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Just "Signed-off-by" line should be at the end of commit message, not in front of it. You can fix it via amending the commit and force-pushings.
behlendorf
approved these changes
Jan 23, 2025
LittleNewton
pushed a commit
to LittleNewton/zfs
that referenced
this pull request
Jan 24, 2025
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 openzfs#16976
LittleNewton
pushed a commit
to LittleNewton/zfs
that referenced
this pull request
Jan 24, 2025
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 openzfs#16976
ixhamza
pushed a commit
to truenas/zfs
that referenced
this pull request
Feb 25, 2025
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 openzfs#16976
lundman
pushed a commit
to openzfsonosx/openzfs-fork
that referenced
this pull request
Jun 2, 2025
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 openzfs#16976
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
.