]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: avoid unnecessary scrub workers allocation
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>
Fri, 11 Oct 2013 18:11:12 +0000 (02:11 +0800)
committerChris Mason <chris.mason@fusionio.com>
Tue, 12 Nov 2013 03:12:58 +0000 (22:12 -0500)
commit396966c3e6b21e714d47e5af1600b94846d0d4c3
tree5277f63351808793d863e08fe5c2e395af29e254
parent3e0c847ef1ae98e2fc47f15f47184d4b35385f5b
Btrfs: avoid unnecessary scrub workers allocation

We only allocate scrub workers if we pass all the necessary
checks, for example, there are no operation in progress.

Besides, move mutex lock protection outside of scrub_workers_get()
/scrub_workers_put().

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/scrub.c