mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
snapshots: Fix monitoring to use cow not internal LV.
This commit is contained in:
parent
ed37b4a626
commit
414d39085c
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.166 -
|
Version 2.02.166 -
|
||||||
=====================================
|
=====================================
|
||||||
|
Always specify snapshot cow LV for monitoring not internal LV. (2.02.165)
|
||||||
Fix lvchange --discard|--zero for active thin-pool.
|
Fix lvchange --discard|--zero for active thin-pool.
|
||||||
Enforce 4MiB or 25% metadata free space for thin pool operations.
|
Enforce 4MiB or 25% metadata free space for thin pool operations.
|
||||||
Fix lock-holder device for thin pool with inactive thin volumes.
|
Fix lock-holder device for thin pool with inactive thin volumes.
|
||||||
|
@ -1774,7 +1774,8 @@ int monitor_dev_for_events(struct cmd_context *cmd, const struct logical_volume
|
|||||||
/*
|
/*
|
||||||
* In case this LV is a snapshot origin, we instead monitor
|
* In case this LV is a snapshot origin, we instead monitor
|
||||||
* each of its respective snapshots. The origin itself may
|
* each of its respective snapshots. The origin itself may
|
||||||
* also need to be monitored if it is a mirror, for example.
|
* also need to be monitored if it is a mirror, for example,
|
||||||
|
* so fall through to process it afterwards.
|
||||||
*/
|
*/
|
||||||
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)
|
||||||
@ -1835,7 +1836,7 @@ int monitor_dev_for_events(struct cmd_context *cmd, const struct logical_volume
|
|||||||
|
|
||||||
if (!monitor)
|
if (!monitor)
|
||||||
/* When unmonitoring, obtain existing dso being used. */
|
/* When unmonitoring, obtain existing dso being used. */
|
||||||
monitored = _device_registered_with_dmeventd(cmd, seg->lv, &pending, &dso);
|
monitored = _device_registered_with_dmeventd(cmd, seg_is_snapshot(seg) ? seg->cow : seg->lv, &pending, &dso);
|
||||||
else
|
else
|
||||||
monitored = seg->segtype->ops->target_monitored(seg, &pending);
|
monitored = seg->segtype->ops->target_monitored(seg, &pending);
|
||||||
|
|
||||||
@ -1870,7 +1871,7 @@ int monitor_dev_for_events(struct cmd_context *cmd, const struct logical_volume
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (new_unmonitor) {
|
if (new_unmonitor) {
|
||||||
if (!target_register_events(cmd, dso, lv, 0, 0, 10)) {
|
if (!target_register_events(cmd, dso, seg_is_snapshot(seg) ? seg->cow : lv, 0, 0, 10)) {
|
||||||
log_error("%s: segment unmonitoring failed.",
|
log_error("%s: segment unmonitoring failed.",
|
||||||
display_lvname(lv));
|
display_lvname(lv));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user