summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2015-11-30 17:10:20 +0100
committerDavid Sterba <dsterba@suse.com>2016-01-04 11:28:24 +0100
commit9bb3e6bc3c6cecd285826c7ee00488bd3d9e372f (patch)
tree434ebe317f1c8a5d1086f0ee098ef744489a01c8
parent81e43dabc87ea9b2242456a8bbe9239e55cb841f (diff)
btrfs-progs: verbose error when we find an unexpected item in sys_array
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--volumes.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/volumes.c b/volumes.c
index b4d489a0..492dcd2b 100644
--- a/volumes.c
+++ b/volumes.c
@@ -1855,7 +1855,11 @@ int btrfs_read_sys_array(struct btrfs_root *root)
if (ret)
break;
} else {
- BUG();
+ printk(
+ "ERROR: unexpected item type %u in sys_array at offset %u\n",
+ (u32)key.type, cur_offset);
+ ret = -EIO;
+ break;
}
array_ptr += len;
sb_array_offset += len;