From: Wang Shilong Date: Thu, 13 Feb 2014 03:19:47 +0000 (+0800) Subject: Btrfs: skip locking when searching commit root X-Git-Tag: v3.15-rc1~23^2~79 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e84752d434b5cca0869e906e7b94d0531b25c6d3;p=uclinux-h8%2Flinux.git 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 Signed-off-by: Josef Bacik --- 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, 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.