]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Btrfs: delete inline extents when we find them during logging
authorJosef Bacik <jbacik@fusionio.com>
Fri, 1 Mar 2013 16:47:21 +0000 (11:47 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Mar 2013 18:26:11 +0000 (11:26 -0700)
commit53fc95ead12d00f7e08554d395875c899fd93c91
tree4a8af15d4e6a147b79c837cbd521f4e65894dc22
parent0a8c4b4e2101b6fb45f4510fed204384d468826a
Btrfs: delete inline extents when we find them during logging

commit 124fe663f93162d17b7e391705cac122101e93d8 upstream.

Apparently when we do inline extents we allow the data to overlap the last chunk
of the btrfs_file_extent_item, which means that we can possibly have a
btrfs_file_extent_item that isn't actually as large as a btrfs_file_extent_item.
This messes with us when we try to overwrite the extent when logging new extents
since we expect for it to be the right size.  To fix this just delete the item
and try to do the insert again which will give us the proper sized
btrfs_file_extent_item.  This fixes a panic where map_private_extent_buffer
would blow up because we're trying to write past the end of the leaf.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/tree-log.c