1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

cleanup: monitoring more readable

Put continue path into one code segment.
This commit is contained in:
Zdenek Kabelac 2013-09-05 11:32:42 +02:00
parent cafde60890
commit 861a3b2f19

View File

@ -1514,22 +1514,18 @@ int monitor_dev_for_events(struct cmd_context *cmd, struct logical_volume *lv,
!monitor_dev_for_events(cmd, seg->metadata_lv, NULL, monitor))
r = 0;
if (!seg_monitored(seg) || (seg->status & PVMOVE))
if (!seg_monitored(seg) ||
(seg->status & PVMOVE) ||
!seg->segtype->ops->target_monitored) /* doesn't support registration */
continue;
monitor_fn = NULL;
monitored = seg->segtype->ops->target_monitored(seg, &pending);
/* Check monitoring status */
if (seg->segtype->ops->target_monitored)
monitored = seg->segtype->ops->target_monitored(seg, &pending);
else
continue; /* segtype doesn't support registration */
/*
* FIXME: We should really try again if pending
*/
/* FIXME: We should really try again if pending */
monitored = (pending) ? 0 : monitored;
monitor_fn = NULL;
if (monitor) {
if (monitored)
log_verbose("%s/%s already monitored.", lv->vg->name, lv->name);