mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-11 20:58:50 +03:00
cleanup: use supplied cmd pointer
This commit is contained in:
parent
30777fa46f
commit
ec4ffeb51c
@ -645,7 +645,7 @@ int lv_info(struct cmd_context *cmd, const struct logical_volume *lv, int use_la
|
|||||||
fs_unlock(); /* For non clustered - wait if there are non-delete ops */
|
fs_unlock(); /* For non clustered - wait if there are non-delete ops */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dev_manager_info(lv->vg->cmd->mem, lv,
|
if (!dev_manager_info(cmd->mem, lv,
|
||||||
(use_layer) ? lv_layer(lv) : NULL,
|
(use_layer) ? lv_layer(lv) : NULL,
|
||||||
with_open_count, with_read_ahead,
|
with_open_count, with_read_ahead,
|
||||||
&dminfo, (info) ? &info->read_ahead : NULL))
|
&dminfo, (info) ? &info->read_ahead : NULL))
|
||||||
@ -794,7 +794,6 @@ int lv_mirror_percent(struct cmd_context *cmd, const struct logical_volume *lv,
|
|||||||
|
|
||||||
log_debug_activation("Checking mirror percent for LV %s/%s", lv->vg->name, lv->name);
|
log_debug_activation("Checking mirror percent for LV %s/%s", lv->vg->name, lv->name);
|
||||||
|
|
||||||
|
|
||||||
if (!(dm = dev_manager_create(lv->vg->cmd, lv->vg->name, 1)))
|
if (!(dm = dev_manager_create(lv->vg->cmd, lv->vg->name, 1)))
|
||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
|
@ -2135,7 +2135,8 @@ static int _lvconvert_merge_old_snapshot(struct cmd_context *cmd,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lv_info(lv->vg->cmd, lv, 0, &info, 1, 0)
|
/* FIXME: test when snapshot is remotely active */
|
||||||
|
if (lv_info(cmd, lv, 0, &info, 1, 0)
|
||||||
&& info.exists && info.live_table &&
|
&& info.exists && info.live_table &&
|
||||||
(!lv_snapshot_percent(lv, &snap_percent) ||
|
(!lv_snapshot_percent(lv, &snap_percent) ||
|
||||||
snap_percent == DM_PERCENT_INVALID)) {
|
snap_percent == DM_PERCENT_INVALID)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user