The new structure is copy-on-write. With the assumption that path lookups are significantly more frequent than chdirs and chrooting this is a win.
This provides stable root and jail root vnodes without the need to reference them on lookup, which in turn means less work on globally shared structures. Note this also happens to fix a bug where jail vnode was never referenced, meaning subsequent access on lookup could run into use-after-free.
Currently starting and ending lookup ends up refing and unrefing the struct. Refing takes the filedesc lock to provide safe access, but with SMR we can get away without it. Moreover, should the struct become cached per-thread like struct cred there would be no need to do anything here. However, the latter runs into potential issues with unmount, so I think SMR is the way to go. I had another idea where liveness itself would be provided by per-thread refs but access to vnodes would require per-cpu refs (or it can use rms locks). This can wait.
Note that there is no effort to actively unshare the struct due to pending SMR work.
The motivation for the change is provide fast path lookup later, but I think it is an improvement in its own right.