]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Btrfs: fix not being able to find skinny extents during relocate
authorJosef Bacik <jbacik@fusionio.com>
Thu, 13 Jun 2013 17:50:23 +0000 (13:50 -0400)
committerJosef Bacik <jbacik@fusionio.com>
Mon, 1 Jul 2013 12:52:30 +0000 (08:52 -0400)
commitaee68ee5f5427b91be5b23459993134ca64ecf00
tree7f38e979667087148c27f48b9e9a6a7e20f1f31c
parentda61d31a78dc2116fa725c92d4eca36dfbc3da8b
Btrfs: fix not being able to find skinny extents during relocate

We unconditionally search for the EXTENT_ITEM_KEY for metadata during balance,
and then check the key that we found to see if it is actually a
METADATA_ITEM_KEY, but this doesn't work right because METADATA is a higher key
value, so if what we are looking for happens to be the first item in the leaf
the search will dump us out at the previous leaf, and we won't find our item.
So instead do what we do everywhere else, search for the skinny extent first and
if we don't find it go back and re-search for the extent item.  This patch fixes
the panic I was hitting when balancing a large file system with skinny extents.
Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/relocation.c