btrfs: fix wrong accounting of raid1 data profile in statfs
authorDavid Sterba <dsterba@suse.cz>
Fri, 14 Nov 2014 14:05:06 +0000 (15:05 +0100)
committerChris Mason <clm@fb.com>
Fri, 21 Nov 2014 01:20:09 +0000 (17:20 -0800)
commit0d95c1bec906dd1ad951c9c001e798ca52baeb0f
tree2b56d45ddd4c375db430ba7406148f97a5453f20
parent321592427c0146126aadfab8a9b663de1875c9f4
btrfs: fix wrong accounting of raid1 data profile in statfs

The sizes that are obtained from space infos are in raw units and have
to be adjusted according to the raid factor. This was missing for
f_bavail and df reported doubled size for raid1.

Reported-by: Martin Steigerwald <Martin@lichtvoll.de>
Fixes: ba7b6e62f420 ("btrfs: adjust statfs calculations according to raid profiles")
CC: stable@vger.kernel.org
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/super.c