mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
debug: monitor_dev_for_events stack trace
This commit is contained in:
parent
03aeb86762
commit
7531a9169e
@ -1657,8 +1657,11 @@ int monitor_dev_for_events(struct cmd_context *cmd, const struct logical_volume
|
|||||||
* In case of a snapshot device, we monitor lv->snapshot->lv,
|
* In case of a snapshot device, we monitor lv->snapshot->lv,
|
||||||
* not the actual LV itself.
|
* not the actual LV itself.
|
||||||
*/
|
*/
|
||||||
if (lv_is_cow(lv) && (laopts->no_merging || !lv_is_merging_cow(lv)))
|
if (lv_is_cow(lv) && (laopts->no_merging || !lv_is_merging_cow(lv))) {
|
||||||
return monitor_dev_for_events(cmd, lv->snapshot->lv, NULL, monitor);
|
if (!(r = monitor_dev_for_events(cmd, lv->snapshot->lv, NULL, monitor)))
|
||||||
|
stack;
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In case this LV is a snapshot origin, we instead monitor
|
* In case this LV is a snapshot origin, we instead monitor
|
||||||
@ -1668,8 +1671,10 @@ int monitor_dev_for_events(struct cmd_context *cmd, const struct logical_volume
|
|||||||
if (!laopts->origin_only && lv_is_origin(lv))
|
if (!laopts->origin_only && lv_is_origin(lv))
|
||||||
dm_list_iterate_safe(snh, snht, &lv->snapshot_segs)
|
dm_list_iterate_safe(snh, snht, &lv->snapshot_segs)
|
||||||
if (!monitor_dev_for_events(cmd, dm_list_struct_base(snh,
|
if (!monitor_dev_for_events(cmd, dm_list_struct_base(snh,
|
||||||
struct lv_segment, origin_list)->cow, NULL, monitor))
|
struct lv_segment, origin_list)->cow, NULL, monitor)) {
|
||||||
|
stack;
|
||||||
r = 0;
|
r = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the volume is mirrored and its log is also mirrored, monitor
|
* If the volume is mirrored and its log is also mirrored, monitor
|
||||||
@ -1678,8 +1683,10 @@ int monitor_dev_for_events(struct cmd_context *cmd, const struct logical_volume
|
|||||||
if ((seg = first_seg(lv)) != NULL && seg->log_lv != NULL &&
|
if ((seg = first_seg(lv)) != NULL && seg->log_lv != NULL &&
|
||||||
(log_seg = first_seg(seg->log_lv)) != NULL &&
|
(log_seg = first_seg(seg->log_lv)) != NULL &&
|
||||||
seg_is_mirrored(log_seg))
|
seg_is_mirrored(log_seg))
|
||||||
if (!monitor_dev_for_events(cmd, seg->log_lv, NULL, monitor))
|
if (!monitor_dev_for_events(cmd, seg->log_lv, NULL, monitor)) {
|
||||||
|
stack;
|
||||||
r = 0;
|
r = 0;
|
||||||
|
}
|
||||||
|
|
||||||
dm_list_iterate_items(seg, &lv->segments) {
|
dm_list_iterate_items(seg, &lv->segments) {
|
||||||
/* Recurse for AREA_LV */
|
/* Recurse for AREA_LV */
|
||||||
@ -1702,12 +1709,16 @@ int monitor_dev_for_events(struct cmd_context *cmd, const struct logical_volume
|
|||||||
*/
|
*/
|
||||||
if (seg->pool_lv &&
|
if (seg->pool_lv &&
|
||||||
!monitor_dev_for_events(cmd, seg->pool_lv,
|
!monitor_dev_for_events(cmd, seg->pool_lv,
|
||||||
(!monitor) ? laopts : NULL, monitor))
|
(!monitor) ? laopts : NULL, monitor)) {
|
||||||
|
stack;
|
||||||
r = 0;
|
r = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (seg->metadata_lv &&
|
if (seg->metadata_lv &&
|
||||||
!monitor_dev_for_events(cmd, seg->metadata_lv, NULL, monitor))
|
!monitor_dev_for_events(cmd, seg->metadata_lv, NULL, monitor)) {
|
||||||
|
stack;
|
||||||
r = 0;
|
r = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!seg_monitored(seg) ||
|
if (!seg_monitored(seg) ||
|
||||||
(seg->status & PVMOVE) ||
|
(seg->status & PVMOVE) ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user