1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 01:55:10 +03:00

refresh: print error message with failing lv name

If there is  suspend/resume error, print error message
with lv name.
Drop goto.
This commit is contained in:
Zdenek Kabelac 2013-11-29 11:10:41 +01:00
parent 37853cc7a9
commit 778de22d51
2 changed files with 11 additions and 11 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.105 -
=====================================
Add error messages with LV names for failing lv refresh.
Compile/link daemons with RELRO and PIE options to harden daemon security.
Support per-object compilation cflags via CFLAGS_object.o.
Automatically detect support for compiler/linker options to use RELRO and PIE.

View File

@ -1417,21 +1417,21 @@ int lv_change_activate(struct cmd_context *cmd, struct logical_volume *lv,
int lv_refresh(struct cmd_context *cmd, struct logical_volume *lv)
{
int r = 0;
if (!cmd->partial_activation && (lv->status & PARTIAL_LV)) {
log_error("Refusing refresh of partial LV %s. Use --partial to override.",
lv->name);
goto out;
return 0;
}
r = suspend_lv(cmd, lv);
if (!r)
goto_out;
if (!suspend_lv(cmd, lv)) {
log_error("Failed to suspend %s.", lv->name);
return 0;
}
r = resume_lv(cmd, lv);
if (!r)
goto_out;
if (!resume_lv(cmd, lv)) {
log_error("Failed to reactivate %s.", lv->name);
return 0;
}
/*
* check if snapshot merge should be polled
@ -1445,8 +1445,7 @@ int lv_refresh(struct cmd_context *cmd, struct logical_volume *lv)
if (background_polling() && lv_is_origin(lv) && lv_is_merging_origin(lv))
lv_spawn_background_polling(cmd, lv);
out:
return r;
return 1;
}
int vg_refresh_visible(struct cmd_context *cmd, struct volume_group *vg)