From: Chris Mason Date: Fri, 9 Oct 2009 15:29:53 +0000 (-0400) Subject: Btrfs: fix file clone ioctl for bookend extents X-Git-Tag: v2.6.32-rc4~7^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac6889cbb254be1ffea376bea4a96ce9be0e0ed0;p=pandora-kernel.git Btrfs: fix file clone ioctl for bookend extents The file clone ioctl was incorrectly taking the offset into the extent on disk into account when calculating the length of the cloned extent. The length never changes based on the offset into the physical extent. Test case: fallocate -l 1g image mke2fs image bcp image image2 e2fsck -f image2 (errors on image2) The math bug ends up wrapping the length of the extent, and things go wrong from there. Signed-off-by: Chris Mason --- Reading git-diff-tree failed