Commit a8a83b61 authored by Wang Shilong's avatar Wang Shilong Committed by Jiri Slaby

Btrfs: skip locking when searching commit root

commit e84752d4 upstream.

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: default avatarWang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 5f328493
......@@ -842,8 +842,10 @@ static int find_parent_nodes(struct btrfs_trans_handle *trans,
path = btrfs_alloc_path();
if (!path)
return -ENOMEM;
if (!trans)
if (!trans) {
path->search_commit_root = 1;
path->skip_locking = 1;
}
/*
* grab both a lock on the path and a lock on the delayed ref head.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment