diff options
author | Wang Shilong <wangsl.fnst@cn.fujitsu.com> | 2014-02-12 22:19:47 -0500 |
---|---|---|
committer | Josef Bacik <jbacik@fb.com> | 2014-03-10 15:16:55 -0400 |
commit | e84752d434b5cca0869e906e7b94d0531b25c6d3 (patch) | |
tree | ead4db0b6f80fef7abfde5396dbd1f7967cc2b9a /fs/btrfs/backref.c | |
parent | 32a447896c7b4c5cf5502a3ca7f5ef57d498fb03 (diff) |
Btrfs: skip locking when searching commit root
We won't change commit root, skip locking dance with commit root
when walking backrefs, this can speed up btrfs send operations.
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fb.com>
Diffstat (limited to 'fs/btrfs/backref.c')
-rw-r--r-- | fs/btrfs/backref.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index a88da721dfc5..860f4f22b9b0 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c | |||
@@ -873,8 +873,10 @@ static int find_parent_nodes(struct btrfs_trans_handle *trans, | |||
873 | path = btrfs_alloc_path(); | 873 | path = btrfs_alloc_path(); |
874 | if (!path) | 874 | if (!path) |
875 | return -ENOMEM; | 875 | return -ENOMEM; |
876 | if (!trans) | 876 | if (!trans) { |
877 | path->search_commit_root = 1; | 877 | path->search_commit_root = 1; |
878 | path->skip_locking = 1; | ||
879 | } | ||
878 | 880 | ||
879 | /* | 881 | /* |
880 | * grab both a lock on the path and a lock on the delayed ref head. | 882 | * grab both a lock on the path and a lock on the delayed ref head. |