HomeFreeBSD

nfsd: Fix NFS access to .zfs/snapshot snapshots

Description

nfsd: Fix NFS access to .zfs/snapshot snapshots

When a process attempts to access a snapshot under
/<dataset>/.zfs/snapshot, the snapshot is automounted.
However, without this patch, the automount does not
set mnt_exjail, which results in the snapshot not being
accessible over NFS.

This patch defines a new function called vfs_exjail_clone()
which sets mnt_exjail from another mount point and
then uses that function to set mnt_exjail in the snapshot
automount. A separate patch that is currently a pull request
for OpenZFS, calls this function to fix the problem.

PR: 275200
Reviewed by: markj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D42672

Details

Provenance
rmacklemAuthored on Nov 23 2023, 3:23 PM
Reviewer
markj
Differential Revision
D42672: Fix ZFS so that it sets mnt_exjail for snapshot automounts
Parents
rG637e4ef1a6bc: libcasper: Fix a typo in a source code comment
Branches
Unknown
Tags
Unknown