btrfs: fix a bogus warning when converting only data or metadata
authorAdam Borowski <kilobyte@angband.pl>
Tue, 7 Mar 2017 22:34:44 +0000 (23:34 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 18 Apr 2017 12:07:23 +0000 (14:07 +0200)
commit14506127979a5a3d0c5d9b4cc76ce9d4ec23b717
treeb75e6497760e7b0c9e08124a4c03e0798ad426e9
parentaeea4c10a88c9ec405072cecb18939b0a9c876f6
btrfs: fix a bogus warning when converting only data or metadata

If your filesystem has, eg, data:raid0 metadata:raid1, and you run "btrfs
balance -dconvert=raid1", the meta.target field will be uninitialized.
That's otherwise ok, as it's unused except for this warning.

Thus, let's use the existing set of raid levels for the comparison.

As a side effect, non-convert balances will now nag about data>metadata.

Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c