Btrfs: remove scrub_super_lock holding in btrfs_sync_log()
Originally, we introduced scrub_super_lock to synchronize tree log code with scrubbing super. However we can replace scrub_super_lock with device_list_mutex, because writing super will hold this mutex, this will reduce an extra lock holding when writing supers in sync log code. 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>
This commit is contained in:

committed by
Chris Mason

parent
7fdf4b608d
commit
9b011adfe1
@@ -132,7 +132,9 @@ struct btrfs_fs_devices {
|
||||
|
||||
/* all of the devices in the FS, protected by a mutex
|
||||
* so we can safely walk it to write out the supers without
|
||||
* worrying about add/remove by the multi-device code
|
||||
* worrying about add/remove by the multi-device code.
|
||||
* Scrubbing super can kick off supers writing by holding
|
||||
* this mutex lock.
|
||||
*/
|
||||
struct mutex device_list_mutex;
|
||||
struct list_head devices;
|
||||
|
Reference in New Issue
Block a user