提交 e84752d4 编写于 作者: W Wang Shilong 提交者: Josef Bacik

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: NWang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: NJosef Bacik <jbacik@fb.com>
上级 32a44789
...@@ -873,8 +873,10 @@ static int find_parent_nodes(struct btrfs_trans_handle *trans, ...@@ -873,8 +873,10 @@ static int find_parent_nodes(struct btrfs_trans_handle *trans,
path = btrfs_alloc_path(); path = btrfs_alloc_path();
if (!path) if (!path)
return -ENOMEM; return -ENOMEM;
if (!trans) if (!trans) {
path->search_commit_root = 1; path->search_commit_root = 1;
path->skip_locking = 1;
}
/* /*
* grab both a lock on the path and a lock on the delayed ref head. * grab both a lock on the path and a lock on the delayed ref head.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册