Btrfs: remove BUG() in raid56
authorLiu Bo <[email protected]>
Fri, 29 Jul 2016 17:57:55 +0000 (10:57 -0700)
committerDavid Sterba <[email protected]>
Mon, 26 Sep 2016 15:59:49 +0000 (17:59 +0200)
commite46a28ca3d0dce8d939b10d4c94eaa2307b6415a
treee6b24762fac0357116bc65db4f71557b162ce649
parentafce772e87c36c7f07f230a76d525025aaf09e41
Btrfs: remove BUG() in raid56

This BUG() has been triggered by a fuzz testing image, which contains
an invalid chunk type, ie. a single stripe chunk has the raid6 type.

Btrfs can handle this gracefully by returning -EIO, so besides using
btrfs_warn to give us more debugging information rather than a single
BUG(), we can return error properly.

Signed-off-by: Liu Bo <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
fs/btrfs/raid56.c