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)
May 21 2026, 11:58 PM
Unknown Object (File)
May 19 2026, 5:34 AM
Unknown Object (File)
May 13 2026, 1:59 AM
Unknown Object (File)
May 7 2026, 3:21 PM
Unknown Object (File)
May 7 2026, 3:04 PM
Unknown Object (File)
May 6 2026, 11:06 PM
Unknown Object (File)
May 6 2026, 7:39 AM
Unknown Object (File)
May 6 2026, 6:45 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

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.