mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
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.
This commit is contained in:
parent
71485ebfc7
commit
700e2a2d25
@ -58,19 +58,12 @@ static int _poll_lvs_in_vg(struct cmd_context *cmd,
|
|||||||
{
|
{
|
||||||
struct lv_list *lvl;
|
struct lv_list *lvl;
|
||||||
struct logical_volume *lv;
|
struct logical_volume *lv;
|
||||||
struct lvinfo info;
|
|
||||||
int lv_active;
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
dm_list_iterate_items(lvl, &vg->lvs) {
|
dm_list_iterate_items(lvl, &vg->lvs) {
|
||||||
lv = lvl->lv;
|
lv = lvl->lv;
|
||||||
|
|
||||||
if (!lv_info(cmd, lv, 0, &info, 0, 0))
|
if (lv_is_active_locally(lv) &&
|
||||||
lv_active = 0;
|
|
||||||
else
|
|
||||||
lv_active = info.exists;
|
|
||||||
|
|
||||||
if (lv_active &&
|
|
||||||
(lv_is_pvmove(lv) || lv_is_converting(lv) || lv_is_merging(lv))) {
|
(lv_is_pvmove(lv) || lv_is_converting(lv) || lv_is_merging(lv))) {
|
||||||
lv_spawn_background_polling(cmd, lv);
|
lv_spawn_background_polling(cmd, lv);
|
||||||
count++;
|
count++;
|
||||||
|
Loading…
Reference in New Issue
Block a user