...and also when vmm is disabled for a jail.
This revision builds off https://reviews.freebsd.org/D31156.
Differential D31225
vmm: Destroy associated VM objects when a jail is destroyed cyril_freebsdfoundation.org on Jul 19 2021, 11:24 PM. Authored by Tags None Referenced Files
Subscribers
Details ...and also when vmm is disabled for a jail. This revision builds off https://reviews.freebsd.org/D31156.
Diff Detail
Event Timeline
Comment Actions I'm not thrilled at the redundant call to vfs_flagopt(), which shouldn't be necessary because kern_jail_set has already looked for allow.novmm and set the permission bit accordingly. But by the time vmmdev_prison_set() is called, the old value of the permission bit is forgotten. So you're left with
Since all this happens only when jail_set(2) is called, which is hardly ever, there's no performance issue, and I guess it just comes down to what makes the code more readable (definitely not the third choice). Just thinking out loud - I imagine you've already considered the options yourself and settled on what looked best. |