mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
refresh: call resume after failing suspend
lv_refresh_suspend_resume() has escaped with fail ret code after failing suspend and could have left many volumes in suspend state. So always unconditionally call resume also when suspend has failed.
This commit is contained in:
parent
98b41db324
commit
067c0a23e5
@ -1,5 +1,6 @@
|
||||
Version 2.02.155 -
|
||||
================================
|
||||
When refresh failed in suspend, call resume upon error path.
|
||||
Support passthrough cache mode when waiting for clean cache.
|
||||
Check cache status only for 'in-use' cache pools.
|
||||
Extend setup_task() to preset flushing for dm_task object.
|
||||
|
@ -1376,6 +1376,7 @@ int replace_lv_with_error_segment(struct logical_volume *lv)
|
||||
int lv_refresh_suspend_resume(const struct logical_volume *lv)
|
||||
{
|
||||
struct cmd_context *cmd = lv->vg->cmd;
|
||||
int r = 1;
|
||||
|
||||
if (!cmd->partial_activation && lv_is_partial(lv)) {
|
||||
log_error("Refusing refresh of partial LV %s."
|
||||
@ -1386,15 +1387,15 @@ int lv_refresh_suspend_resume(const struct logical_volume *lv)
|
||||
|
||||
if (!suspend_lv(cmd, lv)) {
|
||||
log_error("Failed to suspend %s.", display_lvname(lv));
|
||||
return 0;
|
||||
r = 0;
|
||||
}
|
||||
|
||||
if (!resume_lv(cmd, lv)) {
|
||||
log_error("Failed to reactivate %s.", display_lvname(lv));
|
||||
return 0;
|
||||
r = 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return r;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user