]> sourceware.org Git - lvm2.git/commitdiff
export can_split parameter until rest of pvmove allocation restructuring gets done
authorAlasdair Kergon <agk@redhat.com>
Wed, 5 Dec 2007 22:11:20 +0000 (22:11 +0000)
committerAlasdair Kergon <agk@redhat.com>
Wed, 5 Dec 2007 22:11:20 +0000 (22:11 +0000)
WHATS_NEW
configure.in
lib/metadata/lv_alloc.h
lib/metadata/lv_manip.c
man/lvchange.8
man/lvcreate.8
tools/lvconvert.c
tools/lvcreate.c
tools/pvmove.c

index 52400a16ce7ad53a90382059a337b5680c29a7c7..c1ce791351d62c73626791153bc5a79333040f18 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -43,7 +43,9 @@ Version 2.02.29 -
   All tools: print --help output to stdout, not stderr.
   After a diagnostic, suggest --help, rather than printing all --help output.
   Add %PVS extents option to lvresize, lvextend, and lvcreate.
+  Add 'make check' to run tests in new subdirectory 'test'.
   Moved the obsolete test subdirectory to old-tests.
+  Cope with relative paths in configure --with-dmdir.
   Remove no-longer-correct restrictions on PV arg count with stripes/mirrors.
   Fix strdup memory leak in str_list_dup().
   Link with -lpthread when static SELinux libraries require that.
index 6883b522bcbdfb2e3d0301b8597e3582fe5d53e5..96e67729745dd8a360f93a3e9680decba029b9ba 100644 (file)
@@ -1,6 +1,6 @@
 ##
 ## Copyright (C) 2000-2004 Sistina Software, Inc. All rights reserved.
-## Copyright (C) 20042007 Red Hat, Inc. All rights reserved.
+## Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
 ##
 ## This file is part of LVM2.
 ##
index 096057e29d6e491c1e6d44b72057432e3ce77346..c25c32543bbd2515c3d6deefebc7e45336379ea0 100644 (file)
@@ -50,6 +50,7 @@ struct alloc_handle *allocate_extents(struct volume_group *vg,
                                      uint32_t extents,
                                       struct list *allocatable_pvs,
                                      alloc_policy_t alloc,
+                                     unsigned can_split,
                                      struct list *parallel_areas);
 
 int lv_add_segment(struct alloc_handle *ah,
index 33a834877646102b686e06f314aff9b9ab1d6c49..ed4c5909779e2e4e78a6105c92c1622988b17a18 100644 (file)
@@ -1055,13 +1055,13 @@ static int _allocate(struct alloc_handle *ah,
                     struct volume_group *vg,
                     struct logical_volume *lv,
                     uint32_t new_extents,
+                    unsigned can_split,
                     struct list *allocatable_pvs)
 {
        struct pv_area **areas;
        uint32_t allocated = lv ? lv->le_count : 0;
        uint32_t old_allocated;
        struct lv_segment *prev_lvseg = NULL;
-       unsigned can_split = 1; /* Are we allowed more than one segment? */
        int r = 0;
        struct list *pvms;
        uint32_t areas_size;
@@ -1180,6 +1180,7 @@ struct alloc_handle *allocate_extents(struct volume_group *vg,
                                      uint32_t extents,
                                      struct list *allocatable_pvs,
                                      alloc_policy_t alloc,
+                                     unsigned can_split,
                                      struct list *parallel_areas)
 {
        struct alloc_handle *ah;
@@ -1208,7 +1209,7 @@ struct alloc_handle *allocate_extents(struct volume_group *vg,
 
        if (!segtype_is_virtual(segtype) &&
            !_allocate(ah, vg, lv, (lv ? lv->le_count : 0) + extents,
-                      allocatable_pvs)) {
+                      can_split, allocatable_pvs)) {
                stack;
                alloc_destroy(ah);
                return NULL;
@@ -1403,16 +1404,18 @@ int lv_extend(struct logical_volume *lv,
        uint32_t m;
        struct alloc_handle *ah;
        struct lv_segment *seg;
+       unsigned can_split = 1;
 
        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;
+               can_split = 0;
 
        if (!(ah = allocate_extents(lv->vg, lv, segtype, stripes, mirrors, 0,
-                                   extents, allocatable_pvs, alloc, NULL)))
+                                   extents, allocatable_pvs, alloc, can_split,
+                                   NULL)))
                return_0;
 
        if (mirrors < 2) {
index 86c264eba6649c377e22bc422557725fe8da1dac..56a9fa7a9f304dc425ae1d48b444a3be9d3fd88c 100644 (file)
@@ -75,11 +75,10 @@ Change access permission to read-only or read/write.
 .I \-r, \-\-readahead ReadAheadSectors|auto|none
 Set read ahead sector count of this logical volume.
 For volume groups with metadata in lvm1 format, this must
-be a value between 2 and 120.
+be a value between 2 and 120 sectors.
 The default value is "auto" which allows the kernel to choose
 a suitable value automatically.
 "None" is equivalent to specifying zero.
-N.B. This setting is currently disregarded and "auto" is always used.
 .TP
 .I \-\-refresh
 If the logical volume is active, reload its metadata.
index 77bdbb8b258c9ec769e1fb32ab29a54ffd32a289..b3d427e250fc73026cb3501a7086d3b0fdfab15c 100644 (file)
@@ -125,7 +125,6 @@ be a value between 2 and 120.
 The default value is "auto" which allows the kernel to choose
 a suitable value automatically.
 "None" is equivalent to specifying zero.
-N.B. This setting is currently disregarded and "auto" is always used.
 .TP
 .I \-R, \-\-regionsize MirrorLogRegionSize
 A mirror is divided into regions of this size (in MB), and the mirror log 
index a7484828f8ffc8e2fbef0bb0175c43cacf997c7a..5d28bbdb29bc8eb0855d596ce2d4179ffec0e021 100644 (file)
@@ -339,7 +339,7 @@ static int lvconvert_mirrors(struct cmd_context * cmd, struct logical_volume * l
                                            1, lp->mirrors - 1,
                                            corelog ? 0U : 1U,
                                            lv->le_count, lp->pvh, lp->alloc,
-                                           parallel_areas)))
+                                           1, parallel_areas)))
                        return_0;
 
                lp->region_size = adjusted_mirror_region_size(lv->vg->extent_size,
@@ -385,7 +385,7 @@ static int lvconvert_mirrors(struct cmd_context * cmd, struct logical_volume * l
 
                        if (!(ah = allocate_extents(lv->vg, NULL, lp->segtype, 0,
                                                    0, 1, 0, lp->pvh, lp->alloc,
-                                                   parallel_areas))) {
+                                                   1, parallel_areas))) {
                                stack;
                                return 0;
                        }
index 958caa6b94577b4ad9a33b4c6cd3150d7d8e3afb..336c7675ca3ac7cb51d4d0bc8b258ef7cebe86a5 100644 (file)
@@ -750,7 +750,7 @@ static int _lvcreate(struct cmd_context *cmd, struct volume_group *vg,
 
                if (!(ah = allocate_extents(vg, NULL, lp->segtype, lp->stripes,
                                            lp->mirrors, lp->corelog ? 0U : 1U,
-                                           lp->extents, pvh, lp->alloc, NULL)))
+                                           lp->extents, pvh, lp->alloc, 1, NULL)))
                        return_0;
 
                lp->region_size = adjusted_mirror_region_size(vg->extent_size,
index 3a8d1085c525930e0d1b54cecd3f98b3036c9026..e34e6d411fd4de09341951b1d34cb57c0793892b 100644 (file)
@@ -161,6 +161,11 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
                        log_print("Skipping locked LV %s", lv->name);
                        continue;
                }
+               /* FIXME Just insert the layer below - no allocation */
+               // This knows nothing about pvmove
+               // insert_layer_for_segments_on_pv(cmd, lv, source_pvl, lv_mirr, *lvs_changed)
+               //   - for each lv segment using that pv
+               //     - call new fn insert_internal_layer()
                if (!insert_pvmove_mirrors(cmd, lv_mirr, source_pvl, lv,
                                           allocatable_pvs, alloc,
                                           *lvs_changed)) {
@@ -175,6 +180,10 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
                return NULL;
        }
 
+       /* FIXME Do allocation and convert to mirror */
+       // again, this knows nothing about pvmove: it's a normal lvconvert lv_mirr to mirror with in-core log
+       // - a flag passed in requires that parent segs get split after the allocation (with failure if not possible)
+
        return lv_mirr;
 }
 
This page took 0.055318 seconds and 5 git commands to generate.