aboutsummaryrefslogtreecommitdiffstats
path: root/volumes.c
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 /volumes.c
parent81e43dabc87ea9b2242456a8bbe9239e55cb841f (diff)
downloadbtrfs-progs-9bb3e6bc3c6cecd285826c7ee00488bd3d9e372f.tar.gz
btrfs-progs-9bb3e6bc3c6cecd285826c7ee00488bd3d9e372f.tar.xz
btrfs-progs-9bb3e6bc3c6cecd285826c7ee00488bd3d9e372f.zip
btrfs-progs: verbose error when we find an unexpected item in sys_array
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'volumes.c')
-rw-r--r--volumes.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/volumes.c b/volumes.c
index b4d489a..492dcd2 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;