Now that we have a helper to report invalid value of extent inline ref
type, we need to quit gracefully instead of throwing out a kernel panic.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
ret = find_data_references(rc, extent_key,
eb, dref, blocks);
} else {
- BUG();
+ ret = -EINVAL;
+ btrfs_err(rc->extent_root->fs_info,
+ "extent %llu slot %d has an invalid inline ref type",
+ eb->start, path->slots[0]);
}
if (ret) {
err = ret;