summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/free-space-cache.c
diff options
context:
space:
mode:
authorLiu Bo2012-07-06 11:31:36 +0200
committerChris Mason2012-07-23 22:28:03 +0200
commitf6175efab1e024554a104cca1f86134ef7ce06bc (patch)
treedcd739bffd22312c6f3b7f3032beaf8f13eab8e6 /fs/btrfs/free-space-cache.c
parentBtrfs: add ro notification to dump_space_info (diff)
downloadkernel-qcow2-linux-f6175efab1e024554a104cca1f86134ef7ce06bc.tar.gz
kernel-qcow2-linux-f6175efab1e024554a104cca1f86134ef7ce06bc.tar.xz
kernel-qcow2-linux-f6175efab1e024554a104cca1f86134ef7ce06bc.zip
Btrfs: do not count in readonly bytes
If a block group is ro, do not count its entries in when we dump space info. Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/free-space-cache.c')
-rw-r--r--fs/btrfs/free-space-cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 6c4e2baa9290..6b10acfc2f5c 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -1968,7 +1968,7 @@ void btrfs_dump_free_space(struct btrfs_block_group_cache *block_group,
for (n = rb_first(&ctl->free_space_offset); n; n = rb_next(n)) {
info = rb_entry(n, struct btrfs_free_space, offset_index);
- if (info->bytes >= bytes)
+ if (info->bytes >= bytes && !block_group->ro)
count++;
printk(KERN_CRIT "entry offset %llu, bytes %llu, bitmap %s\n",
(unsigned long long)info->offset,