mirror of
https://github.com/versity/scoutfs.git
synced 2026-07-24 00:53:01 +00:00
e31e828aff00c2f01722ea5e69a4433907365203
If there are two tasks waiting for conflicting modes, say a writer waiting for a CW index lock and a index walker waiting for a PR index lock, they can livelock. In the ast one of their modes will be granted. We'll wake them under the lock now that they can see that their mode is ready. But then while still under the lock we see a conflicting waiter, and no users, so we immediately start converting the lock away to the other waiting conflicting mode. The woken waiter is scheduled but now sees that the lock isn't granted anymore because it's converting. This bounces back and forth forever. The fix is to refuse to start conversion while there are still waiters for the currently granted mode. Once they finish it'll be able to convert. Signed-off-by: Zach Brown <zab@versity.com>
Description
No description provided
6.8 MiB
Languages
C
86.3%
Shell
10%
Roff
2.5%
TeX
0.8%
Makefile
0.4%