diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2011-01-05 11:07:15 +0100 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-01-16 17:30:19 +0100 |
commit | 299a08b1c34f9397797946a0fa215c5fd145c5cf (patch) | |
tree | beace30f71e49e4ac6428b33916288695c06539f /fs | |
parent | fs/btrfs: Fix build of ctree (diff) | |
download | linux-299a08b1c34f9397797946a0fa215c5fd145c5cf.tar.xz linux-299a08b1c34f9397797946a0fa215c5fd145c5cf.zip |
btrfs: fix wrong data space statistics
Josef has implemented mixed data/metadata chunks, we must add those chunks'
space just like data chunks.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Reviewed-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/super.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index a1a76b2a61f9..caa5bcc62f16 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -790,11 +790,10 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf) rcu_read_lock(); list_for_each_entry_rcu(found, head, list) { - if (found->flags & (BTRFS_BLOCK_GROUP_METADATA | - BTRFS_BLOCK_GROUP_SYSTEM)) - total_used_data += found->disk_total; - else + if (found->flags & BTRFS_BLOCK_GROUP_DATA) total_used_data += found->disk_used; + else + total_used_data += found->disk_total; total_used += found->disk_used; } rcu_read_unlock(); |