From 253751656b4ae9d57b891954e4ea1eba2a87b44c Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Mon, 20 Nov 2006 16:45:45 +0000 Subject: [PATCH] Fix check for snapshot module when activating snapshot. --- WHATS_NEW | 1 + lib/activate/dev_manager.c | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 82f30ad11..c6552d3ad 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.15 - ==================================== + Fix check for snapshot module when activating snapshot. Fix pvremove error path for case when PV is in use. Warn if certain duplicate config file entries are seen. Enhance lvm_dump.sh for sysreport integration and add man page. diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index 911f6eb7f..ec42e684b 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -782,12 +782,19 @@ static int _add_segment_to_dtree(struct dev_manager *dm, { uint32_t s; struct list *snh; + struct lv_segment *seg_present; /* Ensure required device-mapper targets are loaded */ - if (seg->segtype->ops->target_present && - !seg->segtype->ops->target_present(seg)) { + seg_present = find_cow(seg->lv) ? : seg; + + log_debug("Checking kernel supports %s segment type for %s%s%s", + seg_present->segtype->name, seg->lv->name, + layer ? "-" : "", layer ? : ""); + + if (seg_present->segtype->ops->target_present && + !seg_present->segtype->ops->target_present(seg_present)) { log_error("Can't expand LV %s: %s target support missing " - "from kernel?", seg->lv->name, seg->segtype->name); + "from kernel?", seg->lv->name, seg_present->segtype->name); return 0; } -- 2.43.5