HomeFreeBSD

rms: fixup concurrent writer handling and add more features

Description

rms: fixup concurrent writer handling and add more features

Previously the code had one wait channel for all pending writers.
This could result in a buggy scenario where after a writer switches
the lock mode form readers to writers goes off CPU, another writer
queues itself and then the last reader wakes up the latter instead
of the former.

Use a separate channel.

While here add features to reliably detect whether curthread has
the lock write-owned. This will be used by ZFS.

Details

Provenance
mjgAuthored on Nov 4 2020, 9:18 PM
Parents
rG4e306624d1e4: dtb/rockchip: Add rockpi-4 to the build
Branches
Unknown
Tags
Unknown

Event Timeline