From: Zhao Lei Date: Mon, 16 Feb 2015 10:52:17 +0000 (+0800) Subject: btrfs: Fix tail space processing in find_free_dev_extent() X-Git-Tag: omap-for-v4.1/fixes-rc1~43^2~24 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2ab76188ec185dde84e7fe7c533ef2f5d668a32;p=pandora-kernel.git btrfs: Fix tail space processing in find_free_dev_extent() It is another reason for NO_SPACE case. When we found enough free space in loop and saved them to max_hole_start/size before, and tail space contains pending extent, origional innocent max_hole_start/size are reset in retry. As a result, find_free_dev_extent() returns less space than it can, and cause NO_SPACE in user program. Reviewed-by: Liu Bo Signed-off-by: Zhao Lei Signed-off-by: Chris Mason --- Reading git-diff-tree failed