mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +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:
parent
37853cc7a9
commit
778de22d51
@ -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.
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user