btrfs-progs: mkfs: check metadata redundancy
authorSam Tygier <samtygier@yahoo.co.uk>
Sat, 30 May 2015 14:54:48 +0000 (15:54 +0100)
committerDavid Sterba <dsterba@suse.cz>
Tue, 2 Jun 2015 15:02:19 +0000 (17:02 +0200)
commitfbb356632c19c9262231e2062d2f708574f794ad
tree600f4608c547983d27a9223d2992384cf9b2814a
parent1e9a6b698479ad759270270d585a5af36253cc30
btrfs-progs: mkfs: check metadata redundancy

Currently BTRFS allows you to make bad choices of data and
metadata levels. For example -d raid1 -m raid0 means you can
only use half your total disk space, but will lose everything
if 1 disk fails. It should give a warning in these cases.

When making a filesystem, check that metadata mode is at least
as redundant as the data mode. For example give warning when:

-d raid1 -m raid0

Signed-off-by: Sam Tygier <samtygier@yahoo.co.uk>
[make the check more visible in mkfs output]
Signed-off-by: David Sterba <dsterba@suse.cz>
mkfs.c
utils.c
utils.h