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
F98657619: D45647.diff
Fri, Oct 4, 6:00 AM
F98509671: D45647.diff
Thu, Oct 3, 4:00 PM
Unknown Object (File)
Fri, Sep 27, 2:43 PM
Unknown Object (File)
Mon, Sep 23, 2:27 AM
Unknown Object (File)
Fri, Sep 20, 9:48 PM
Unknown Object (File)
Fri, Sep 20, 11:15 AM
Unknown Object (File)
Thu, Sep 19, 10:15 AM
Unknown Object (File)
Wed, Sep 18, 10:59 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.