Commit 299a08b1 authored by Miao Xie's avatar Miao Xie Committed by Chris Mason
Browse files

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: default avatarMiao Xie <>
Reviewed-by: default avatarJosef Bacik <>
Signed-off-by: default avatarChris Mason <>
parent f580eb09
......@@ -790,11 +790,10 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf)
list_for_each_entry_rcu(found, head, list) {
if (found->flags & (BTRFS_BLOCK_GROUP_METADATA |
total_used_data += found->disk_total;
if (found->flags & BTRFS_BLOCK_GROUP_DATA)
total_used_data += found->disk_used;
total_used_data += found->disk_total;
total_used += found->disk_used;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment