[prev in list] [next in list] [prev in thread] [next in thread]
List: lvm-devel
Subject: [lvm-devel] [PATCH mirror 10/13] Generalize "mlog" handling of dtree
From: "Jun'ichi Nomura" <j-nomura () ce ! jp ! nec ! com>
Date: 2007-11-22 2:09:38
Message-ID: 4744E4E2.8030700 () ce ! jp ! nec ! com
[Download RAW message or body]
Currently, "_mlog" is handled specially in dtree.
It puts a restriction to log LV naming and actually,
current code can't allow multiple mirror logs in a LV.
This is a problem if we allow to add temporary mirror logs
for resynching newly added mirrors.
The patch changes the addition of mirror log to dtree:
BEFORE: Adds a device with lv->name + "_mlog"
AFTER: Adds seg->log_lv
If there is a case where log LV is not set in seg->log_lv
but should be treated as a part of dtree, this change breaks the case.
I would like to know if there's such a case.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
["lvm2-deptree-generalize-mlog.patch" (text/x-patch)]
Index: LVM2.work/lib/activate/dev_manager.c
===================================================================
--- LVM2.work.orig/lib/activate/dev_manager.c
+++ LVM2.work/lib/activate/dev_manager.c
@@ -673,9 +673,6 @@ static int _add_lv_to_dtree(struct dev_m
if (!_add_dev_to_dtree(dm, dtree, lv, "cow"))
return_0;
- if (!_add_dev_to_dtree(dm, dtree, lv, "_mlog"))
- return_0;
-
return 1;
}
@@ -704,7 +701,7 @@ static struct dm_tree *_create_partial_d
}
/* Add any LVs used by segments in this LV */
- list_iterate_items(seg, &lv->segments)
+ list_iterate_items(seg, &lv->segments) {
for (s = 0; s < seg->area_count; s++)
if (seg_type(seg, s) == AREA_LV && seg_lv(seg, s)) {
if (!_add_lv_to_dtree(dm, dtree, seg_lv(seg, s))) {
@@ -712,6 +709,11 @@ static struct dm_tree *_create_partial_d
goto fail;
}
}
+ if (seg->log_lv && !_add_lv_to_dtree(dm, dtree, seg->log_lv)) {
+ stack;
+ goto fail;
+ }
+ }
return dtree;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic