Fix ZFS on FreeBSD so that snapshots under .zfs/snapshot are NFS visible #15563
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.
Call vfs_exjail_clone() for mounts created under .zfs/snapshot to fill in the mnt_exjail field for the mount. If this is not done, the snapshots under .zfs/snapshot with not be accessible over NFS.
Signed-off by: Rick Macklem [email protected]
Motivation and Context
Without this patch, newer versions of FreeBSD (post 13.2) cannot access
ZFS snapshots in .zfs/snapshot over NFS.
Description
Added a new argument to mount_snapshot() which is the parent
mount point so that vfs_exjail_clone() can be called with that
parent mount point.
vfs_exjail_clone() fills in mnt_exjail, so that the snapshot can
be accessed over NFS.
How Has This Been Tested?
An NFS mount of a dataset on a FreeBSD NFS server (post 13.2)
without this patch could not access the snapshots in .zfs/snapshot.
After applying this patch, the NFS client did access the snapshot
on .zfs/snapshot without difficulty.
Types of changes
Checklist:
Signed-off-by
.