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
F107308372: D45647.diff
Sun, Jan 12, 7:43 AM
Unknown Object (File)
Fri, Jan 10, 5:59 AM
Unknown Object (File)
Nov 22 2024, 11:06 AM
Unknown Object (File)
Nov 19 2024, 7:04 AM
Unknown Object (File)
Nov 19 2024, 7:04 AM
Unknown Object (File)
Nov 19 2024, 7:04 AM
Unknown Object (File)
Nov 19 2024, 6:40 AM
Unknown Object (File)
Oct 4 2024, 11:35 AM

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.