mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
lv: more details about monitoring lvs
Show "not supported" when LV does not support dmeventd monitoring. Show "disabled" for LV with disabled dmeventd monitoring. (lvdisplay -m)
This commit is contained in:
parent
8a07f57ba4
commit
3596558861
@ -311,10 +311,11 @@ char *lvseg_monitor_dup(struct dm_pool *mem, const struct lv_segment *seg)
|
|||||||
segm = first_seg(seg->lv->snapshot->lv);
|
segm = first_seg(seg->lv->snapshot->lv);
|
||||||
|
|
||||||
// log_debug("Query LV:%s mon:%s segm:%s tgtm:%p segmon:%d statusm:%d", seg->lv->name, segm->lv->name, segm->segtype->name, segm->segtype->ops->target_monitored, seg_monitored(segm), (int)(segm->status & PVMOVE));
|
// log_debug("Query LV:%s mon:%s segm:%s tgtm:%p segmon:%d statusm:%d", seg->lv->name, segm->lv->name, segm->segtype->name, segm->segtype->ops->target_monitored, seg_monitored(segm), (int)(segm->status & PVMOVE));
|
||||||
if ((dmeventd_monitor_mode() != 1) ||
|
if (!segm->segtype->ops ||
|
||||||
!segm->segtype->ops ||
|
|
||||||
!segm->segtype->ops->target_monitored)
|
!segm->segtype->ops->target_monitored)
|
||||||
/* Nothing to do, monitoring not supported */;
|
s = "disabled";
|
||||||
|
else if (dmeventd_monitor_mode() != 1)
|
||||||
|
s = "not enabled";
|
||||||
else if (lv_is_cow_covering_origin(seg->lv))
|
else if (lv_is_cow_covering_origin(seg->lv))
|
||||||
/* Nothing to do, snapshot already covers origin */;
|
/* Nothing to do, snapshot already covers origin */;
|
||||||
else if (!seg_monitored(segm) || (segm->status & PVMOVE))
|
else if (!seg_monitored(segm) || (segm->status & PVMOVE))
|
||||||
|
Loading…
Reference in New Issue
Block a user