]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
Btrfs: make sure a bitmap has enough bytes
authorJosef Bacik <josef@redhat.com>
Thu, 26 Jan 2012 20:01:11 +0000 (15:01 -0500)
committerChris Mason <chris.mason@oracle.com>
Thu, 26 Jan 2012 20:01:11 +0000 (15:01 -0500)
commit357b9784b79924a31ccded5d9a0c688f48cc28f2
treeba47dcbcc40b956b30e4b27c790547cb5d3fc563
parentb1375d64c539c5b76794be759b62d3f178e67c32
Btrfs: make sure a bitmap has enough bytes

We have only been checking for min_bytes available in bitmap entries, but we
won't successfully setup a bitmap cluster unless it has at least bytes in the
bitmap, so in the common case min_bytes is 4k and we want something like 2MB, so
if there are a bunch of bitmap entries with less than 2mb's in them, we'll
search all them anyway, which is suboptimal.  Fix this check.  Thanks,

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