btrfs-progs: Fix a bug in chunk item extra check and allow degraded chunk.
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Fri, 15 May 2015 05:11:14 +0000 (13:11 +0800)
committerDavid Sterba <dsterba@suse.cz>
Wed, 20 May 2015 12:24:26 +0000 (14:24 +0200)
commit4643934109dd7483282d95b6e183a2d17189d7e6
tree7beb0a9511df5120ff6b008a5dc6ebd38c2f26ce
parentf146c40c65e0142b52418a0a1cbaf2808e658d76
btrfs-progs: Fix a bug in chunk item extra check and allow degraded chunk.

For DUP profile, the num_stripes should be 2 not 1.
This causes btrfs offline tool fails on valid image.

Also, num_stripes check is too restrict for btrfsck self test,
as there is some image in degraded mode, so modify it to allow degraded
chunk.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
volumes.c