Page MenuHomeFreeBSD

Revert rest of a5970a529c2d95271: use vrefact() when working on fp->f_vnode
ClosedPublic

Authored by kib on Apr 13 2022, 11:50 PM.

Details

Summary
Now, since O_PATH-opened file descriptors use use references instead of
the hold reference, vrefact() chahges from that revision can be
reverted.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kib requested review of this revision.Apr 13 2022, 11:50 PM
This revision is now accepted and ready to land.Apr 14 2022, 3:27 AM

FYI, wanted to add some info. of how to repro. the issue. Doing a nullfs mount with nocache set and then doing an untar into that mount would fail on missing directory. With this change, that doesn't happen.

FYI, wanted to add some info. of how to repro. the issue. Doing a nullfs mount with nocache set and then doing an untar into that mount would fail on missing directory. With this change, that doesn't happen.

Well no. This change restores nanooptimization that was not compatible with the f_vnode only taking hold. I.e., the fix for your case was already committed.

OTOH it would be useful if you provide Peter with your test program and instructions how to reproduce, so that this case does not regress more.

OTOH it would be useful if you provide Peter with your test program and instructions how to reproduce, so that this case does not regress more.

I now have a regression test, based on the described tar extract scenario.
It no longer fails with "etc/periodic/daily/: Could not stat etc/periodic/daily: Not a directory"