This bug existed even in original code --- repetitive vgchange -ay would spawn multiple background polling processes for the same LV. Signed-off-by: Mikulas Patocka --- tools/vgchange.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) Index: LVM2.2.02.39/tools/vgchange.c =================================================================== --- LVM2.2.02.39.orig/tools/vgchange.c 2008-07-06 22:25:45.000000000 +0200 +++ LVM2.2.02.39/tools/vgchange.c 2008-07-06 22:27:23.000000000 +0200 @@ -59,8 +59,12 @@ static int _activate_lvs_in_vg(struct cm int count = 0; list_iterate_items(lvl, &vg->lvs) { + int was_active; + lv = lvl->lv; + was_active = lv_is_active(lv); + /* Only request activation of snapshot origin devices */ if ((lv->status & SNAPSHOT) || lv_is_cow(lv)) continue; @@ -90,7 +94,8 @@ static int _activate_lvs_in_vg(struct cm } else if (!activate_lv(cmd, lv)) continue; - if (activate != CHANGE_AN && activate != CHANGE_ALN) + if (activate != CHANGE_AN && activate != CHANGE_ALN && + !was_active) lvchange_activate_background_polling(cmd, lv); count++;