projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60e45f8
)
btrfs-progs: convert: improve error hanling of init_btrfs
author
David Sterba
<dsterba@suse.com>
Tue, 23 Aug 2016 17:24:48 +0000
(19:24 +0200)
committer
David Sterba
<dsterba@suse.com>
Wed, 24 Aug 2016 12:37:36 +0000
(14:37 +0200)
Replace BUG_ONs and verbosely report the errors.
Signed-off-by: David Sterba <dsterba@suse.com>
btrfs-convert.c
patch
|
blob
|
history
diff --git
a/btrfs-convert.c
b/btrfs-convert.c
index
66f62e8
..
d2ff517
100644
(file)
--- a/
btrfs-convert.c
+++ b/
btrfs-convert.c
@@
-1298,7
+1298,11
@@
static int init_btrfs(struct btrfs_mkfs_config *cfg, struct btrfs_root *root,
fs_info->avoid_sys_chunk_alloc = 1;
fs_info->avoid_meta_chunk_alloc = 1;
trans = btrfs_start_transaction(root, 1);
- BUG_ON(!trans);
+ if (!trans) {
+ error("unable to start transaction");
+ ret = -EINVAL;
+ goto err;
+ }
ret = btrfs_fix_block_accounting(trans, root);
if (ret)
goto err;