]> git.hungrycats.org Git - linux/commit
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)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Sun, 14 Dec 2014 03:34:54 +0000 (22:34 -0500)
commita11920168a51177f57cbc60c4408c6dce79577a0
tree0c1dfbbcf81b7ad76234103d97e7e32ec1e803b3
parentfa8b82a0c99096255326b3428cb72c80e704fa71
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>
(cherry picked from commit 0d95c1bec906dd1ad951c9c001e798ca52baeb0f)
fs/btrfs/super.c