Page MenuHomeFreeBSD

Document and subtlely change the zfs.mount_snapshot jail parameter
ClosedPublic

Authored by jamie on Wed, Jun 19, 8:04 PM.
Referenced Files
Unknown Object (File)
Mon, Jun 24, 8:09 PM
Unknown Object (File)
Sat, Jun 22, 6:06 PM
Unknown Object (File)
Fri, Jun 21, 6:08 AM
Unknown Object (File)
Thu, Jun 20, 11:40 PM
Unknown Object (File)
Thu, Jun 20, 10:06 PM
Unknown Object (File)
Thu, Jun 20, 5:53 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.Wed, Jun 19, 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.Thu, Jun 20, 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.