]> sourceware.org Git - lvm2.git/commitdiff
lvconvert: Pass region_size to lv_raid_convert.
authorAlasdair G Kergon <agk@redhat.com>
Tue, 2 Aug 2016 22:51:20 +0000 (23:51 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Tue, 2 Aug 2016 22:51:20 +0000 (23:51 +0100)
lib/metadata/metadata-exported.h
lib/metadata/raid_manip.c
tools/lvconvert.c

index a8cbfa2fb29f5c662b3a0d770a2eabed79c4cc5f..531fa03a1cbc80a994b45e8c780cfebc39cb9ea1 100644 (file)
@@ -1201,6 +1201,7 @@ int lv_raid_convert(struct logical_volume *lv,
                    int yes, int force,
                    const unsigned stripes,
                    const unsigned new_stripe_size,
+                   const uint32_t new_region_size,
                    struct dm_list *allocate_pvs);
 int lv_raid_replace(struct logical_volume *lv, struct dm_list *remove_pvs,
                    struct dm_list *allocate_pvs);
index 0364f2fe5969b815affe3de31c8100e9b04708aa..9da05e5c8b662cba338a0340f7e9e34f074c08e6 100644 (file)
@@ -2231,6 +2231,7 @@ static struct lv_segment *_convert_striped_to_raid0(struct logical_volume *lv,
        unsigned new_image_count,               \
        const unsigned new_stripes,             \
        uint32_t new_stripe_size,               \
+       const uint32_t new_region_size,         \
        struct dm_list *allocate_pvs
 
 typedef int (*takeover_fn_t)(TAKEOVER_FN_ARGS);
@@ -2737,6 +2738,7 @@ int lv_raid_convert(struct logical_volume *lv,
                    int yes, int force,
                    const unsigned new_stripes,
                    const unsigned new_stripe_size,
+                   const uint32_t new_region_size,
                    struct dm_list *allocate_pvs)
 {
        struct lv_segment *seg = first_seg(lv);
@@ -2765,7 +2767,8 @@ int lv_raid_convert(struct logical_volume *lv,
 
        /* Exit without doing activation checks if the combination isn't possible */
        if (_takeover_not_possible(takeover_fn))
-               return takeover_fn(lv, new_segtype, yes, force, new_image_count, new_stripes, stripe_size, allocate_pvs);
+               return takeover_fn(lv, new_segtype, yes, force, new_image_count, new_stripes, stripe_size,
+                                  new_region_size, allocate_pvs);
 
        log_verbose("Converting %s from %s to %s.",
                    display_lvname(lv), lvseg_name(first_seg(lv)),
@@ -2795,7 +2798,8 @@ int lv_raid_convert(struct logical_volume *lv,
                return 0;
        }
 
-       return takeover_fn(lv, new_segtype, yes, force, new_image_count, new_stripes, stripe_size, allocate_pvs);
+       return takeover_fn(lv, new_segtype, yes, force, new_image_count, new_stripes, stripe_size,
+                          new_region_size, allocate_pvs);
 }
 
 static int _remove_partial_multi_segment_image(struct logical_volume *lv,
index c01eec9c4a3ce8e523f6359cabc5a16a4e88db59..d5eaee43072620fab0fedf1b07dab692635f1470 100644 (file)
@@ -1900,7 +1900,8 @@ static int _lvconvert_raid(struct logical_volume *lv, struct lvconvert_params *l
                        log_error("RAID module does not support RAID0.");
                        return 0;
                }
-               if (!lv_raid_convert(lv, lp->segtype, lp->yes, lp->force, lp->stripes, lp->stripe_size, lp->pvh))
+               if (!lv_raid_convert(lv, lp->segtype, lp->yes, lp->force, lp->stripes, lp->stripe_size,
+                                    lp->region_size, lp->pvh))
                        return_0;
                log_print_unless_silent("Logical volume %s successfully converted.",
                                        display_lvname(lv));
This page took 0.09146 seconds and 5 git commands to generate.