1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Ensure presence of virtual targets before attempting activation.

This commit is contained in:
Alasdair Kergon 2004-05-12 20:43:34 +00:00
parent 369028100b
commit e0a86d8c18
2 changed files with 18 additions and 1 deletions

View File

@ -1,5 +1,7 @@
Version 2.00.16 -
=============================
Ensure presence of virtual targets before attempting activating.
Attempt to fix resizing of snapshot origins.
Restructure lvresize, bringing it closer to lvcreate.
A quick sanity check on vg_disk struct when read in. More checks needed.
Only include visible LVs in active/open counts.

View File

@ -2048,8 +2048,9 @@ static int _remove_suspended_lvs(struct dev_manager *dm,
static int _targets_present(struct dev_manager *dm, struct list *lvs)
{
struct logical_volume *lv;
struct list *lvh;
struct list *lvh, *segh;
struct segment_type *segtype;
struct lv_segment *seg;
int snapshots = 0, mirrors = 0;
list_iterate(lvh, lvs) {
@ -2062,6 +2063,20 @@ static int _targets_present(struct dev_manager *dm, struct list *lvs)
if (!mirrors)
if (lv->status & PVMOVE)
mirrors = 1;
if (lv->status & VIRTUAL) {
list_iterate(segh, &lv->segments) {
seg = list_item(segh, struct lv_segment);
if (seg->segtype->ops->target_present &&
!seg->segtype->ops->target_present()) {
log_error("Can't expand LV: %s target "
"support missing "
"from kernel?",
seg->segtype->name);
return 0;
}
}
}
}
if (mirrors) {