mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-25 10:04:17 +03:00
remove unused suspend code path
This commit is contained in:
parent
a8ac6e4a15
commit
2a3168e0d6
@ -2162,8 +2162,7 @@ static int _fill_in_active_list(struct dev_manager *dm, struct volume_group *vg)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _action(struct dev_manager *dm, struct logical_volume *lv,
|
static int _action_activate(struct dev_manager *dm, struct logical_volume *lv)
|
||||||
action_t action)
|
|
||||||
{
|
{
|
||||||
if (!_scan_existing_devices(dm)) {
|
if (!_scan_existing_devices(dm)) {
|
||||||
stack;
|
stack;
|
||||||
@ -2175,34 +2174,23 @@ static int _action(struct dev_manager *dm, struct logical_volume *lv,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action == ACTIVATE || action == DEACTIVATE)
|
/* Get into known state - remove from active list if present */
|
||||||
/* Get into known state - remove from active list if present */
|
if (!_remove_lvs(dm, lv)) {
|
||||||
if (!_remove_lvs(dm, lv)) {
|
stack;
|
||||||
stack;
|
return 0;
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (action == ACTIVATE) {
|
|
||||||
/* Add to active & reload lists */
|
|
||||||
if (!_add_lvs(dm->mem, &dm->reload_list, lv) ||
|
|
||||||
!_add_lvs(dm->mem, &dm->active_list, lv)) {
|
|
||||||
stack;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action == SUSPEND || action == RESUME || action == ACTIVATE)
|
/* Add to active & reload lists */
|
||||||
/* Get into known state - remove from suspend list if present */
|
if (!_add_lvs(dm->mem, &dm->reload_list, lv) ||
|
||||||
if (!_remove_suspended_lvs(dm, lv)) {
|
!_add_lvs(dm->mem, &dm->active_list, lv)) {
|
||||||
stack;
|
stack;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action == SUSPEND) {
|
/* Get into known state - remove from suspend list if present */
|
||||||
if (!_add_lvs(dm->mem, &dm->suspend_list, lv)) {
|
if (!_remove_suspended_lvs(dm, lv)) {
|
||||||
stack;
|
stack;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_targets_present(dm, &dm->active_list) ||
|
if (!_targets_present(dm, &dm->active_list) ||
|
||||||
@ -2221,7 +2209,7 @@ static int _action(struct dev_manager *dm, struct logical_volume *lv,
|
|||||||
|
|
||||||
int dev_manager_activate(struct dev_manager *dm, struct logical_volume *lv)
|
int dev_manager_activate(struct dev_manager *dm, struct logical_volume *lv)
|
||||||
{
|
{
|
||||||
return _action(dm, lv, ACTIVATE);
|
return _action_activate(dm, lv);
|
||||||
}
|
}
|
||||||
|
|
||||||
int dev_manager_lv_mknodes(const struct logical_volume *lv)
|
int dev_manager_lv_mknodes(const struct logical_volume *lv)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user