Page MenuHomeFreeBSD

Document and subtlely change the zfs.mount_snapshot jail parameter
ClosedPublic

Authored by jamie on Jun 19 2024, 8:04 PM.
Referenced Files
F131682424: D45647.diff
Fri, Oct 10, 7:42 AM
Unknown Object (File)
Wed, Sep 24, 1:14 AM
Unknown Object (File)
Mon, Sep 22, 1:32 AM
Unknown Object (File)
Fri, Sep 19, 12:43 PM
Unknown Object (File)
Tue, Sep 16, 5:24 AM
Unknown Object (File)
Fri, Sep 12, 7:11 AM
Unknown Object (File)
Aug 29 2025, 2:58 PM
Unknown Object (File)
Aug 25 2025, 11:06 PM

Details

Summary

The parameter zfs.mount_snapshot was added that allows jailed users to mount ZFS snapshots. It also fixes bug 274263, which is about accessing those snapshots via the .zfs directory, not mounting them. Both of these uses should be documented in jail(8).

Also, the parameter operates as a boolean, but is listed as an plain integer (format "I" instead of "B"). Changing it to a proper boolean parameter would allow the existing boolean handling in jail.conf (i.e. "zfs.mount_snapshot" and "zfs.nomount_snapshot"), while the current "zfs.mount_snapshot=1" would still work.

The ZFS code change is trivial, but I'd still like buy-in because it's contrib code.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jamie requested review of this revision.Jun 19 2024, 8:04 PM
avg added a subscriber: avg.

I would subtly change the title :-)
Otherwise, looks good to me.

This revision is now accepted and ready to land.Jun 20 2024, 4:56 AM

I guess the change for sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c go to upstream first. Will it ?

I guess the change for sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c go to upstream first. Will it ?

See, this is the kind of thing that keeps me from checking it in. But I'll sit a few days longer, and absent anyone saying "no, wait!" I'll let it get upstreamed whenever.