summaryrefslogtreecommitdiff
path: root/tools/vgchange.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2017-12-08 13:15:21 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2017-12-08 13:21:15 +0100
commit700e2a2d251cf8dcaf56035e0bd83ce8f808b5c0 (patch)
tree77d7e8a8b957141a4ed0b68062f334f51f40abed /tools/vgchange.c
parent71485ebfc759299610e279a91b97215b556295df (diff)
downloadlvm2-700e2a2d251cf8dcaf56035e0bd83ce8f808b5c0.tar.gz
cleanup: switch to standard query
In /tools part we should mostly use standard functions lv_is_active* unless there is good reason to not use it.
Diffstat (limited to 'tools/vgchange.c')
-rw-r--r--tools/vgchange.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/tools/vgchange.c b/tools/vgchange.c
index 48e64c50e..ea737badc 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -58,19 +58,12 @@ static int _poll_lvs_in_vg(struct cmd_context *cmd,
{
struct lv_list *lvl;
struct logical_volume *lv;
- struct lvinfo info;
- int lv_active;
int count = 0;
dm_list_iterate_items(lvl, &vg->lvs) {
lv = lvl->lv;
- if (!lv_info(cmd, lv, 0, &info, 0, 0))
- lv_active = 0;
- else
- lv_active = info.exists;
-
- if (lv_active &&
+ if (lv_is_active_locally(lv) &&
(lv_is_pvmove(lv) || lv_is_converting(lv) || lv_is_merging(lv))) {
lv_spawn_background_polling(cmd, lv);
count++;