]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: add waitqueue instead of doing busy waiting for more delayed refs
authorJan Schmidt <list.btrfs@jan-o-sch.net>
Mon, 12 Dec 2011 15:10:07 +0000 (16:10 +0100)
committerJan Schmidt <list.btrfs@jan-o-sch.net>
Wed, 4 Jan 2012 15:12:48 +0000 (16:12 +0100)
commit66c17604bf61750d9c49c49a32ef833b7b9e92a2
treeaddddb060b018eb569e97c11e1a1451feef11c7a
parent06f1bf8b983e1ebc6f77b00e1b93e0a54982bae0
Btrfs: add waitqueue instead of doing busy waiting for more delayed refs

Now that we may be holding back delayed refs for a limited period, we
might end up having no runnable delayed refs. Without this commit, we'd
do busy waiting in that thread until another (runnable) ref arives.
Instead, we're detecting this situation and use a waitqueue, such that
we only try to run more refs after
a) another runnable ref was added  or
b) delayed refs are no longer held back

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
fs/btrfs/delayed-ref.c
fs/btrfs/delayed-ref.h
fs/btrfs/extent-tree.c
fs/btrfs/transaction.c