diff options
author | Ondrej Kozina <okozina@redhat.com> | 2015-04-14 14:43:16 +0200 |
---|---|---|
committer | Ondrej Kozina <okozina@redhat.com> | 2015-04-28 23:19:20 +0200 |
commit | 15a563c376d5288f6ec61c20422c27352363f6e1 (patch) | |
tree | 7f97a5cfd4eb7e98cd52006a9389d1d27fc13f89 | |
parent | ea5c1b0a7310ffb9528a4c3451d347360b021303 (diff) | |
download | lvm2-15a563c376d5288f6ec61c20422c27352363f6e1.tar.gz |
polldaemon: remove redundant log messages
also alter comments describing the change in _poll_vg
wrt correct handling of multiple LVs
-rw-r--r-- | tools/polldaemon.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/tools/polldaemon.c b/tools/polldaemon.c index 1b6e1b4ef..2684f6358 100644 --- a/tools/polldaemon.c +++ b/tools/polldaemon.c @@ -207,13 +207,9 @@ static int _poll_vg(struct cmd_context *cmd, const char *vgname, if (!(sls = str_list_create(cmd->mem))) return ECMD_FAILED; - log_verbose("Looking for pvmove LVs in VG: %s.", vg->name); - /* - * _check_lv_status must not be called from within any - * dm_list_iterate_ routine with vg->lvs as list head. - * It may remove more than one LV in the process thus - * even "*_safe" variant won't help. + * first iterate all LVs in a VG and collect LVs suitable + * for polling (or an abort) which takes place below */ dm_list_iterate_items(lvl, &vg->lvs) { lv = lvl->lv; @@ -240,19 +236,13 @@ static int _poll_vg(struct cmd_context *cmd, const char *vgname, log_error("Failed to clone pvname"); goto err; } - - log_verbose("Found LV: %s/%s. It belongs to pvmove task on PV %s.", lv->vg->name, lv->name, name); } + /* perform the poll operation on LVs collected in previous cycle */ dm_list_iterate_items(sl, sls) { lv = parms->poll_fns->get_copy_lv(cmd, vg, sl->str, NULL, parms->lv_type); - if (lv) { - log_verbose("About to call _check_lv_status on LV: %s/%s, name: %s", - lv->vg->name, lv->name, sl->str); - if (_check_lv_status(cmd, vg, lv, sl->str, parms, &finished) && - !finished) - parms->outstanding_count++; - } + if (lv && _check_lv_status(cmd, vg, lv, sl->str, parms, &finished) && !finished) + parms->outstanding_count++; } err: |