]> sourceware.org Git - lvm2.git/commitdiff
Move fields.
authorAlasdair Kergon <agk@redhat.com>
Tue, 6 May 2003 12:02:36 +0000 (12:02 +0000)
committerAlasdair Kergon <agk@redhat.com>
Tue, 6 May 2003 12:02:36 +0000 (12:02 +0000)
lib/format_text/export.c
lib/format_text/flags.c
lib/format_text/format-text.c
lib/format_text/import_vsn1.c

index d88ed288653498b437efa0a6da588226b3e73c56..1efe5add7fa5735a3230995a0f31aae79b72db16 100644 (file)
@@ -400,6 +400,10 @@ static int _print_segment(struct formatter *f, struct volume_group *vg,
                _outf(f, "%s_count = %u%s", type, seg->area_count,
                      (seg->area_count == 1) ? "\t# linear" : "");
 
+               if ((seg->type == SEG_MIRRORED) && (seg->status & PVMOVE))
+                       _out_size(f, (uint64_t) seg->extents_moved,
+                                 "extents_moved = %u", seg->extents_moved);
+
                if ((seg->type == SEG_STRIPED) && (seg->area_count > 1))
                        _out_size(f, (uint64_t) seg->stripe_size,
                                  "stripe_size = %u", seg->stripe_size);
index 1b85e847d7271051de9e19883adc93ba34955674..9a63273e252f15b6aedbb2be8e8c925690402e3f 100644 (file)
@@ -22,7 +22,7 @@ static struct flag _vg_flags[] = {
        {EXPORTED_VG, "EXPORTED"},
        {RESIZEABLE_VG, "RESIZEABLE"},
        {PARTIAL_VG, "PARTIAL"},
-       {PVMOVE_VG, "PVMOVE"},
+       {PVMOVE, "PVMOVE"},
        {LVM_READ, "READ"},
        {LVM_WRITE, "WRITE"},
        {CLUSTERED, "CLUSTERED"},
@@ -41,6 +41,8 @@ static struct flag _lv_flags[] = {
        {LVM_WRITE, "WRITE"},
        {FIXED_MINOR, "FIXED_MINOR"},
        {VISIBLE_LV, "VISIBLE"},
+       {PVMOVE, "PVMOVE"},
+       {LOCKED, "LOCKED"},
        {0, NULL}
 };
 
index eaa74f54f50bed9ffbea33b50a093bb36de2f30e..e8e342c032d31699fd5cd7257ca60235fc32cdf7 100644 (file)
@@ -1147,7 +1147,7 @@ static int _pv_read(const struct format_type *fmt, const char *pv_name,
        }
 
        /* Perform full scan and try again */
-       cache_label_scan(fmt->cmd, 0);
+       cache_label_scan(fmt->cmd, 1);
 
        if (info->vginfo && info->vginfo->vgname && *info->vginfo->vgname &&
            _get_pv_from_vg(info->fmt, info->vginfo->vgname, info->dev->pvid,
index 11b4d56fbbdb8760a18c434c9c7730fc210e7853..41e1d29f1d71bcf6ec7e09aaf0b472d0f979825f 100644 (file)
@@ -221,7 +221,7 @@ static int _read_segment(struct pool *mem, struct volume_group *vg,
        struct config_value *cv;
        const char *seg_name = sn->key;
        uint32_t start_extent, extent_count;
-       uint32_t chunk_size;
+       uint32_t chunk_size, extents_moved = 0u, seg_status = 0u;
        const char *org_name, *cow_name;
        struct logical_volume *org, *cow, *lv1;
        segment_type_t segtype;
@@ -267,6 +267,16 @@ static int _read_segment(struct pool *mem, struct volume_group *vg,
                                  "segment '%s'.", sn->key);
                        return 0;
                }
+
+               if (find_config_node(sn, "extents_moved", '/')) {
+                       if (_read_uint32(sn, "extents_moved", &extents_moved))
+                               seg_status |= PVMOVE;
+                       else {
+                               log_error("Couldn't read 'extents_moved' for "
+                                         "segment '%s'.", sn->key);
+                               return 0;
+                       }
+               }
        }
 
        if (!(seg = pool_zalloc(mem, sizeof(*seg) +
@@ -280,6 +290,8 @@ static int _read_segment(struct pool *mem, struct volume_group *vg,
        seg->len = extent_count;
        seg->area_len = extent_count;
        seg->type = segtype;
+       seg->status = seg_status;
+       seg->extents_moved = extents_moved;
 
        switch (segtype) {
        case SEG_SNAPSHOT:
This page took 0.042294 seconds and 5 git commands to generate.