aboutsummaryrefslogtreecommitdiff
path: root/crypto/ecb.c
diff options
context:
space:
mode:
authorJosef Bacik2009-07-31 11:03:58 -0400
committerChris Mason2009-07-31 11:03:58 -0400
commit6606bb97e146a387932efee263745b7240a11193 (patch)
tree76652e563a889cc03d7d179074bb1aab9ef3a3f4 /crypto/ecb.c
parentf36f3042eae238bdaefe7c79310afe573bfc3622 (diff)
Btrfs: fix btrfs_remove_from_free_space corner case
Yan Zheng hit a problem where we tried to remove some free space but failed because we couldn't find the free space entry. This is because the free space was held within a bitmap that had a starting offset well before the actual offset of the free space, and there were free space extents that were in the same range as that offset, so tree_search_offset returned with NULL because we couldn't find a free space extent that had that offset. This is fixed by making sure that if we fail to find the entry, we re-search again with bitmap_only set to 1 and do an offset_to_bitmap so we can get the appropriate bitmap. A similar problem happens in btrfs_alloc_from_bitmap for the clustering code, but that is not as bad since we will just go and redo our cluster allocation. Also this adds some debugging checks to make sure that the free space we are trying to remove from the bitmap is in fact there. This can probably go away after a while, but since this code is only used by the tree-logging stuff it would be nice to run with it for a while to make sure there are no problems. Signed-off-by: Josef Bacik <jbacik@redhat.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'crypto/ecb.c')
0 files changed, 0 insertions, 0 deletions