diff options
author | Wang Shilong <wangsl.fnst@cn.fujitsu.com> | 2013-10-25 07:12:02 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-11-11 22:10:13 -0500 |
commit | 9b011adfe14977fcda977234609d43ca52463a3d (patch) | |
tree | a96feceecabdc4bb71d8ff099a4317d3f8f1d9fe /fs/btrfs/tree-log.c | |
parent | 7fdf4b608dda5eea114cb23623b52e34dd5972f5 (diff) |
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>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r-- | fs/btrfs/tree-log.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index f98002ed32b1..257cbae8c948 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c | |||
@@ -2586,9 +2586,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans, | |||
2586 | * the running transaction open, so a full commit can't hop | 2586 | * the running transaction open, so a full commit can't hop |
2587 | * in and cause problems either. | 2587 | * in and cause problems either. |
2588 | */ | 2588 | */ |
2589 | btrfs_scrub_pause_super(root); | ||
2590 | ret = write_ctree_super(trans, root->fs_info->tree_root, 1); | 2589 | ret = write_ctree_super(trans, root->fs_info->tree_root, 1); |
2591 | btrfs_scrub_continue_super(root); | ||
2592 | if (ret) { | 2590 | if (ret) { |
2593 | btrfs_abort_transaction(trans, root, ret); | 2591 | btrfs_abort_transaction(trans, root, ret); |
2594 | goto out_wake_log_root; | 2592 | goto out_wake_log_root; |