mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
debug: lvconvert add missing display_lvname
Add missing display_lvname in _lvconvert_merge_thin_snapshot(). Also when we detect missing origin, report Internal error, which would likely be the primary fault here (and avoid dereft of NULL origin as noticed by Coverity).
This commit is contained in:
parent
0f4d96f1bd
commit
8ebf2b0611
@ -2238,8 +2238,8 @@ static int _lvconvert_merge_thin_snapshot(struct cmd_context *cmd,
|
||||
struct logical_volume *origin = snap_seg->origin;
|
||||
|
||||
if (!origin) {
|
||||
log_error("\"%s\" is not a mergeable logical volume.",
|
||||
lv->name);
|
||||
log_error("%s is not a mergeable logical volume.",
|
||||
display_lvname(lv));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2251,9 +2251,12 @@ static int _lvconvert_merge_thin_snapshot(struct cmd_context *cmd,
|
||||
}
|
||||
|
||||
if (lv_is_external_origin(origin)) {
|
||||
origin = origin_from_cow(lv);
|
||||
log_error("%s is read-only external origin %s.",
|
||||
display_lvname(lv), display_lvname(origin));
|
||||
if (!(origin = origin_from_cow(lv)))
|
||||
log_error(INTERNAL_ERROR "%s is missing origin.",
|
||||
display_lvname(lv));
|
||||
else
|
||||
log_error("%s is read-only external origin %s.",
|
||||
display_lvname(lv), display_lvname(origin));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user