From: Li Zefan Date: Wed, 26 Jan 2011 06:10:43 +0000 (+0800) Subject: Btrfs: Fix file clone when source offset is not 0 X-Git-Tag: v2.6.38-rc4~2^2~21^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d728ec7aefdca5419d2ebfb28c147e81a4b59f4;p=pandora-kernel.git Btrfs: Fix file clone when source offset is not 0 Suppose: - the source extent is: [0, 100] - the src offset is 10 - the clone length is 90 - the dest offset is 0 This statement: new_key.offset = key.offset + destoff - off will produce such an extent for the dest file: [ino, BTRFS_EXTENT_DATA_KEY, -10] , which is obviously wrong. Signed-off-by: Li Zefan --- Reading git-diff-tree failed