]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: make sure not to return overlapping extents to fiemap
authorChris Mason <chris.mason@oracle.com>
Tue, 8 Mar 2011 16:54:40 +0000 (11:54 -0500)
committerChris Mason <chris.mason@oracle.com>
Tue, 8 Mar 2011 16:58:09 +0000 (11:58 -0500)
commitd182d5cf4929ee2a7e982f0c842af3c0a8455db0
treead3f19c4281877767f6dce99f0e003284a159e71
parent4861d20aee552754bc08e046abe0083156369109
Btrfs: make sure not to return overlapping extents to fiemap

The btrfs fiemap code was incorrectly returning duplicate or overlapping
extents in some cases.  cp was blindly trusting this result and we would
end up with a destination file that was bigger than the original because
some bytes were copied twice.

The fix here adjusts our offsets to make sure we're always moving
forward in the fiemap results.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/extent_io.c