From: Josef Bacik Date: Fri, 24 Jan 2014 19:05:42 +0000 (-0500) Subject: Btrfs: only process as many file extents as there are refs X-Git-Tag: v3.14-rc1~29^2~40 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ef81ac86c8a44ab9f4e6e04e1f4c9ea53615b8a;p=pandora-kernel.git Btrfs: only process as many file extents as there are refs The backref walking code will search down to the key it is looking for and then proceed to walk _all_ of the extents on the file until it hits the end. This is suboptimal with large files, we only need to look for as many extents as we have references for that inode. I have a testcase that creates a randomly written 4 gig file and before this patch it took 6min 30sec to do the initial send, with this patch it takes 2min 30sec to do the intial send. Thanks, Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- Reading git-diff-tree failed