]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: avoid unnecessary switch of path locks to blocking mode
authorFilipe Manana <fdmanana@suse.com>
Mon, 28 Jul 2014 18:37:17 +0000 (19:37 +0100)
committerChris Mason <clm@fb.com>
Wed, 17 Sep 2014 20:37:56 +0000 (13:37 -0700)
commit09fe64defb7d607f254b6d44b843a46d7d4ea0c4
tree9134be532e8fb6d6875fd62d74ee37605094d8b9
parent9560d342a00785f443d9c1eb7dbf25fb2a76b147
Btrfs: avoid unnecessary switch of path locks to blocking mode

If we need to cow a node, increase the write lock level and retry the
tree search, there's no point of changing the node locks in our path
to blocking mode, as we only waste time and unnecessarily wake up other
tasks waiting on the spinning locks (just to block them again shortly
after) because we release our path before repeating the tree search.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/ctree.c