Page MenuHomeFreeBSD

vfs: fully lockless v_writecount adjustment
ClosedPublic

Authored by mjg on Nov 26 2021, 1:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 15, 10:10 PM
Unknown Object (File)
Fri, Oct 10, 4:20 AM
Unknown Object (File)
Sun, Oct 5, 10:57 PM
Unknown Object (File)
Sun, Oct 5, 3:14 PM
Unknown Object (File)
Tue, Sep 30, 10:16 PM
Unknown Object (File)
Sep 4 2025, 6:06 PM
Unknown Object (File)
Sep 2 2025, 7:04 PM
Unknown Object (File)
Sep 2 2025, 6:36 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mjg requested review of this revision.Nov 26 2021, 1:03 PM
mjg updated this revision to Diff 99051.
  • upload correct patch
sys/kern/vfs_default.c
1322

Isn't this unsafe? You should ref the vnode before adding 1 to execcount if you ever saw n == 0, and rollback before returning if actually used cmpset was for n < 0.

sys/kern/vfs_default.c
1322

this can only be a problem if someone bogusly adjusts writecount back to 0, but i can make the change if you insist

mjg retitled this revision from vfs: fully lockless v_writecount adjustmen to vfs: fully lockless v_writecount adjustment.
This revision is now accepted and ready to land.Nov 27 2021, 9:22 PM
This revision was automatically updated to reflect the committed changes.