From: Qu Wenruo Date: Fri, 18 Jul 2014 01:55:43 +0000 (+0800) Subject: btrfs: Return right extent when fiemap gives unaligned offset and len. X-Git-Tag: omap-fixes-against-v3.17-rc3~41^2~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c91943b5066314a8bb9f0a65584e5e4cd92ea63;p=pandora-kernel.git btrfs: Return right extent when fiemap gives unaligned offset and len. When page aligned start and len passed to extent_fiemap(), the result is good, but when start and len is not aligned, e.g. start = 1 and len = 4095 is passed to extent_fiemap(), it returns no extent. The problem is that start and len is all rounded down which causes the problem. This patch will round down start and round up (start + len) to return right extent. Reported-by: Chandan Rajendra Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: Chris Mason --- Reading git-diff-tree failed