public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 lib/metadata/lv_alloc.h lib/metadata/lv_m ...
@ 2005-11-24 20:58 agk
0 siblings, 0 replies; 3+ messages in thread
From: agk @ 2005-11-24 20:58 UTC (permalink / raw)
To: lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2005-11-24 20:58:44
Modified files:
lib/metadata : lv_alloc.h lv_manip.c
tools : lvcreate.c
Log message:
preparation for parallel_areas changes to allocation code
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_alloc.h.diff?cvsroot=lvm2&r1=1.13&r2=1.14
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.91&r2=1.92
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvcreate.c.diff?cvsroot=lvm2&r1=1.107&r2=1.108
^ permalink raw reply [flat|nested] 3+ messages in thread
* LVM2 lib/metadata/lv_alloc.h lib/metadata/lv_m ...
@ 2007-11-22 14:54 agk
0 siblings, 0 replies; 3+ messages in thread
From: agk @ 2007-11-22 14:54 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2007-11-22 14:54:35
Modified files:
lib/metadata : lv_alloc.h lv_manip.c
tools : lvconvert.c lvcreate.c
Log message:
drop mirrored_pv/mirrored_pe from alloc handle
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_alloc.h.diff?cvsroot=lvm2&r1=1.17&r2=1.18
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.134&r2=1.135
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvconvert.c.diff?cvsroot=lvm2&r1=1.45&r2=1.46
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvcreate.c.diff?cvsroot=lvm2&r1=1.160&r2=1.161
--- LVM2/lib/metadata/lv_alloc.h 2007/08/22 14:38:17 1.17
+++ LVM2/lib/metadata/lv_alloc.h 2007/11/22 14:54:35 1.18
@@ -48,8 +48,6 @@
uint32_t stripes,
uint32_t mirrors, uint32_t log_count,
uint32_t extents,
- struct physical_volume *mirrored_pv,
- uint32_t mirrored_pe,
struct list *allocatable_pvs,
alloc_policy_t alloc,
struct list *parallel_areas);
--- LVM2/lib/metadata/lv_manip.c 2007/11/12 20:51:53 1.134
+++ LVM2/lib/metadata/lv_manip.c 2007/11/22 14:54:35 1.135
@@ -414,8 +414,6 @@
uint32_t log_count; /* Number of parallel 1-extent logs */
uint32_t total_area_len; /* Total number of parallel extents */
- struct physical_volume *mirrored_pv; /* FIXME Remove this */
- uint32_t mirrored_pe; /* FIXME Remove this */
struct list *parallel_areas; /* PVs to avoid */
struct alloced_area log_area; /* Extent used for log */
@@ -441,8 +439,6 @@
uint32_t mirrors,
uint32_t stripes,
uint32_t log_count,
- struct physical_volume *mirrored_pv,
- uint32_t mirrored_pe,
struct list *parallel_areas)
{
struct alloc_handle *ah;
@@ -453,15 +449,8 @@
return NULL;
}
- if ((stripes > 1 || mirrors > 1) && mirrored_pv) {
- log_error("Can't mix striping or mirroring with "
- "creation of a mirrored PV yet");
- return NULL;
- }
-
- if (log_count && (stripes > 1 || mirrored_pv)) {
- log_error("Can't mix striping or pvmove with "
- "a mirror log yet.");
+ if (log_count && stripes > 1) {
+ log_error("Can't mix striping with a mirror log yet.");
return NULL;
}
@@ -469,8 +458,6 @@
area_count = 0;
else if (mirrors > 1)
area_count = mirrors;
- else if (mirrored_pv)
- area_count = 1;
else
area_count = stripes;
@@ -497,8 +484,6 @@
for (s = 0; s < ah->area_count; s++)
list_init(&ah->alloced_areas[s]);
- ah->mirrored_pv = mirrored_pv;
- ah->mirrored_pe = mirrored_pe;
ah->parallel_areas = parallel_areas;
return ah;
@@ -1087,7 +1072,7 @@
return 1;
}
- if (ah->mirrored_pv || (ah->alloc == ALLOC_CONTIGUOUS))
+ if (ah->alloc == ALLOC_CONTIGUOUS)
can_split = 0;
if (lv && !list_empty(&lv->segments))
@@ -1193,8 +1178,6 @@
uint32_t stripes,
uint32_t mirrors, uint32_t log_count,
uint32_t extents,
- struct physical_volume *mirrored_pv,
- uint32_t mirrored_pe,
struct list *allocatable_pvs,
alloc_policy_t alloc,
struct list *parallel_areas)
@@ -1220,11 +1203,8 @@
alloc = vg->alloc;
if (!(ah = _alloc_init(vg->cmd, vg->cmd->mem, segtype, alloc, mirrors,
- stripes, log_count, mirrored_pv,
- mirrored_pe, parallel_areas))) {
- stack;
- return NULL;
- }
+ stripes, log_count, parallel_areas)))
+ return_NULL;
if (!segtype_is_virtual(segtype) &&
!_allocate(ah, vg, lv, (lv ? lv->le_count : 0) + extents,
@@ -1427,12 +1407,13 @@
if (segtype_is_virtual(segtype))
return lv_add_virtual_segment(lv, status, extents, segtype);
+ /* FIXME Temporary restriction during code reorganisation */
+ if (mirrored_pv)
+ alloc = ALLOC_CONTIGUOUS;
+
if (!(ah = allocate_extents(lv->vg, lv, segtype, stripes, mirrors, 0,
- extents, mirrored_pv, mirrored_pe,
- allocatable_pvs, alloc, NULL))) {
- stack;
- return 0;
- }
+ extents, allocatable_pvs, alloc, NULL)))
+ return_0;
if (mirrors < 2) {
if (!lv_add_segment(ah, 0, ah->area_count, lv, segtype, stripe_size,
--- LVM2/tools/lvconvert.c 2007/11/15 02:20:03 1.45
+++ LVM2/tools/lvconvert.c 2007/11/22 14:54:35 1.46
@@ -338,9 +338,7 @@
if (!(ah = allocate_extents(lv->vg, NULL, lp->segtype,
1, lp->mirrors - 1,
corelog ? 0U : 1U,
- lv->le_count,
- NULL, 0, lp->pvh,
- lp->alloc,
+ lv->le_count, lp->pvh, lp->alloc,
parallel_areas)))
return_0;
@@ -386,9 +384,7 @@
}
if (!(ah = allocate_extents(lv->vg, NULL, lp->segtype, 0,
- 0, 1, 0,
- NULL, 0, lp->pvh,
- lp->alloc,
+ 0, 1, 0, lp->pvh, lp->alloc,
parallel_areas))) {
stack;
return 0;
--- LVM2/tools/lvcreate.c 2007/11/15 02:20:03 1.160
+++ LVM2/tools/lvcreate.c 2007/11/22 14:54:35 1.161
@@ -740,11 +740,8 @@
if (!(ah = allocate_extents(vg, NULL, lp->segtype, lp->stripes,
lp->mirrors, lp->corelog ? 0U : 1U,
- lp->extents, NULL, 0,
- pvh, lp->alloc, NULL))) {
- stack;
- return 0;
- }
+ lp->extents, pvh, lp->alloc, NULL)))
+ return_0;
lp->region_size = adjusted_mirror_region_size(vg->extent_size,
lp->extents,
^ permalink raw reply [flat|nested] 3+ messages in thread
* LVM2 lib/metadata/lv_alloc.h lib/metadata/lv_m ...
@ 2005-10-28 12:48 agk
0 siblings, 0 replies; 3+ messages in thread
From: agk @ 2005-10-28 12:48 UTC (permalink / raw)
To: lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2005-10-28 12:48:50
Modified files:
lib/metadata : lv_alloc.h lv_manip.c merge.c metadata.c
metadata.h mirror.c
tools : lvconvert.c
Log message:
more mirror library functions
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_alloc.h.diff?cvsroot=lvm2&r1=1.12&r2=1.13
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.87&r2=1.88
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/merge.c.diff?cvsroot=lvm2&r1=1.26&r2=1.27
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.84&r2=1.85
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.h.diff?cvsroot=lvm2&r1=1.132&r2=1.133
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/mirror.c.diff?cvsroot=lvm2&r1=1.22&r2=1.23
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/lvconvert.c.diff?cvsroot=lvm2&r1=1.3&r2=1.4
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-11-22 14:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-24 20:58 LVM2 lib/metadata/lv_alloc.h lib/metadata/lv_m agk
-- strict thread matches above, loose matches on Subject: below --
2007-11-22 14:54 agk
2005-10-28 12:48 agk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).