1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cleanup: update messages in lvconvert

Use display_lvname and update thin snapshot merge error message.
This commit is contained in:
Zdenek Kabelac 2017-11-05 10:22:31 +01:00
parent e2fce429cf
commit f7f2f77dca

View File

@ -2018,9 +2018,10 @@ static int _lvconvert_merge_old_snapshot(struct cmd_context *cmd,
}
if (lv_is_external_origin(origin_from_cow(lv))) {
log_error("Cannot merge snapshot \"%s\" into "
"the read-only external origin \"%s\".",
lv->name, origin_from_cow(lv)->name);
log_error("Cannot merge snapshot %s into "
"the read-only external origin %s.",
display_lvname(lv),
display_lvname(origin_from_cow(lv)));
return 0;
}
@ -2029,8 +2030,8 @@ static int _lvconvert_merge_old_snapshot(struct cmd_context *cmd,
&& info.exists && info.live_table &&
(!lv_snapshot_percent(lv, &snap_percent) ||
snap_percent == DM_PERCENT_INVALID)) {
log_error("Unable to merge invalidated snapshot LV \"%s\".",
lv->name);
log_error("Unable to merge invalidated snapshot LV %s.",
display_lvname(lv));
return 0;
}
@ -2119,7 +2120,9 @@ static int _lvconvert_merge_thin_snapshot(struct cmd_context *cmd,
/* Check if merge is possible */
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));
return 0;
}