btrfs-progs: handle invalid num_stripes in sys_array
authorDavid Sterba <dsterba@suse.com>
Mon, 30 Nov 2015 15:44:29 +0000 (16:44 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 4 Jan 2016 10:28:24 +0000 (11:28 +0100)
commit81e43dabc87ea9b2242456a8bbe9239e55cb841f
tree6aaca9ce103dc02d66b086ccb8c10979d474345a
parentd9463cfeaa9a131062752c1136825071137c78f5
btrfs-progs: handle invalid num_stripes in sys_array

We can handle the special case of num_stripes == 0 directly inside
btrfs_read_sys_array. The BUG_ON in btrfs_chunk_item_size is there to
catch other unhandled cases where we fail to validate external data,
like in btrfs-show-super.

Signed-off-by: David Sterba <dsterba@suse.com>
volumes.c