]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: make sure to recheck for bitmaps in clusters
authorChris Mason <chris.mason@oracle.com>
Fri, 10 Jun 2011 20:36:57 +0000 (16:36 -0400)
committerChris Mason <chris.mason@oracle.com>
Fri, 10 Jun 2011 20:36:57 +0000 (16:36 -0400)
commit0a3de2062e3132a3b8c025af244a959431a88273
tree5e48b7ce7220a2b99f60574f6b02b6b41286d5de
parent4194946ab478f0c08964c094d759e3010b73fac2
Btrfs: make sure to recheck for bitmaps in clusters

Josef recently changed the free extent cache to look in
the block group cluster for any bitmaps before trying to
add a new bitmap for the same offset.  This avoids BUG_ON()s due
covering duplicate ranges.

But it didn't go quite far enough.  A given free range might span
between one or more bitmaps or free space entries.  The code has
looping to cover this, but it doesn't check for clustered bitmaps
every time.

This shuffles our gotos to check for a bitmap in the cluster
for every new bitmap entry we try to add.

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