mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-04 09:18:36 +03:00
lvconvert: fix shown lv name for snapshot split
We can't keep 'display_lvname' for too long - it's using
ringbuffer and keeps limited number of names. So it's
safe only per few simple tests, but can't be used anymore
after some function calls..
(Fixes 00e641ef37
)
This commit is contained in:
parent
c90e9392e4
commit
eb3f83357a
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.169 -
|
Version 2.02.169 -
|
||||||
=====================================
|
=====================================
|
||||||
|
Fix displayed lv name when splitting snapshot (2.02.146).
|
||||||
Warn about command not making metadata backup just once per command.
|
Warn about command not making metadata backup just once per command.
|
||||||
Enable usage of cached volume as thin volume's external origin.
|
Enable usage of cached volume as thin volume's external origin.
|
||||||
Support cache volume activation with -real layer.
|
Support cache volume activation with -real layer.
|
||||||
|
@ -2167,7 +2167,7 @@ static int _lvconvert_splitsnapshot(struct cmd_context *cmd, struct logical_volu
|
|||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
if (lv_is_pvmove(cow) || lv_is_mirror_type(cow) || lv_is_raid_type(cow) || lv_is_thin_type(cow)) {
|
if (lv_is_pvmove(cow) || lv_is_mirror_type(cow) || lv_is_raid_type(cow) || lv_is_thin_type(cow)) {
|
||||||
log_error("LV %s type is unsupported with --splitsnapshot.", cow_name);
|
log_error("LV %s type is unsupported with --splitsnapshot.", display_lvname(cow));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2179,8 +2179,8 @@ static int _lvconvert_splitsnapshot(struct cmd_context *cmd, struct logical_volu
|
|||||||
lv_is_visible(cow) &&
|
lv_is_visible(cow) &&
|
||||||
lv_is_active(cow)) {
|
lv_is_active(cow)) {
|
||||||
if (yes_no_prompt("Do you really want to split off active "
|
if (yes_no_prompt("Do you really want to split off active "
|
||||||
"logical volume %s? [y/n]: ", cow_name) == 'n') {
|
"logical volume %s? [y/n]: ", display_lvname(cow)) == 'n') {
|
||||||
log_error("Logical volume %s not split.", cow_name);
|
log_error("Logical volume %s not split.", display_lvname(cow));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2189,14 +2189,14 @@ static int _lvconvert_splitsnapshot(struct cmd_context *cmd, struct logical_volu
|
|||||||
if (!archive(vg))
|
if (!archive(vg))
|
||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
log_verbose("Splitting snapshot %s from its origin.", cow_name);
|
log_verbose("Splitting snapshot %s from its origin.", display_lvname(cow));
|
||||||
|
|
||||||
if (!vg_remove_snapshot(cow))
|
if (!vg_remove_snapshot(cow))
|
||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
backup(vg);
|
backup(vg);
|
||||||
|
|
||||||
log_print_unless_silent("Logical Volume %s split from its origin.", cow_name);
|
log_print_unless_silent("Logical Volume %s split from its origin.", display_lvname(cow));
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user