mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
cleanup: update messages in lvconvert
Use display_lvname and update thin snapshot merge error message.
This commit is contained in:
parent
e2fce429cf
commit
f7f2f77dca
@ -2018,9 +2018,10 @@ static int _lvconvert_merge_old_snapshot(struct cmd_context *cmd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (lv_is_external_origin(origin_from_cow(lv))) {
|
if (lv_is_external_origin(origin_from_cow(lv))) {
|
||||||
log_error("Cannot merge snapshot \"%s\" into "
|
log_error("Cannot merge snapshot %s into "
|
||||||
"the read-only external origin \"%s\".",
|
"the read-only external origin %s.",
|
||||||
lv->name, origin_from_cow(lv)->name);
|
display_lvname(lv),
|
||||||
|
display_lvname(origin_from_cow(lv)));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2029,8 +2030,8 @@ static int _lvconvert_merge_old_snapshot(struct cmd_context *cmd,
|
|||||||
&& info.exists && info.live_table &&
|
&& info.exists && info.live_table &&
|
||||||
(!lv_snapshot_percent(lv, &snap_percent) ||
|
(!lv_snapshot_percent(lv, &snap_percent) ||
|
||||||
snap_percent == DM_PERCENT_INVALID)) {
|
snap_percent == DM_PERCENT_INVALID)) {
|
||||||
log_error("Unable to merge invalidated snapshot LV \"%s\".",
|
log_error("Unable to merge invalidated snapshot LV %s.",
|
||||||
lv->name);
|
display_lvname(lv));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2119,7 +2120,9 @@ static int _lvconvert_merge_thin_snapshot(struct cmd_context *cmd,
|
|||||||
|
|
||||||
/* Check if merge is possible */
|
/* Check if merge is possible */
|
||||||
if (lv_is_merging_origin(origin)) {
|
if (lv_is_merging_origin(origin)) {
|
||||||
log_error("Snapshot %s is already merging into the origin.",
|
log_error("Cannot merge snapshot %s into the origin %s "
|
||||||
|
"with merging snapshot %s.",
|
||||||
|
display_lvname(lv), display_lvname(origin),
|
||||||
display_lvname(find_snapshot(origin)->lv));
|
display_lvname(find_snapshot(origin)->lv));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user