1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cleanup: use supplied cmd pointer

This commit is contained in:
Zdenek Kabelac 2014-09-23 16:49:46 +02:00
parent 30777fa46f
commit ec4ffeb51c
2 changed files with 3 additions and 3 deletions

View File

@ -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 */
}
if (!dev_manager_info(lv->vg->cmd->mem, lv,
if (!dev_manager_info(cmd->mem, lv,
(use_layer) ? lv_layer(lv) : NULL,
with_open_count, with_read_ahead,
&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);
if (!(dm = dev_manager_create(lv->vg->cmd, lv->vg->name, 1)))
return_0;

View File

@ -2135,7 +2135,8 @@ static int _lvconvert_merge_old_snapshot(struct cmd_context *cmd,
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 &&
(!lv_snapshot_percent(lv, &snap_percent) ||
snap_percent == DM_PERCENT_INVALID)) {