mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-08 08:58:50 +03:00
Thanks to Zdenek Kabelac (kabi) for pointing out that I was using
dm_pool_free incorrectly. This check-in fixes that incorrect usage. I've also added a WHATS_NEW line to reflect the changes I made to allow lv_extend to operate on 0 length intrinsically layered LVs (i.e mirrors and RAID). I forgot that in the last commit.
This commit is contained in:
parent
fe93c99ad9
commit
532e6c8ae3
@ -1,5 +1,6 @@
|
||||
Version 2.02.85 -
|
||||
===================================
|
||||
Allow lv_extend() to work on zero length intrinsically layered LVs.
|
||||
Keep the cache content when the exported vg buffer is matching.
|
||||
Extend the set of memory regions, that are not locked to memory.
|
||||
Enhance usability with the valgrind memcheck tool.
|
||||
|
@ -2114,8 +2114,8 @@ static int _lv_insert_empty_sublvs(struct logical_volume *lv,
|
||||
struct logical_volume *sub_lv;
|
||||
uint32_t i;
|
||||
uint64_t status = 0;
|
||||
char *img_name;
|
||||
size_t len;
|
||||
size_t len = strlen(lv->name) + 32;
|
||||
char img_name[len];
|
||||
struct lv_segment *mapseg;
|
||||
|
||||
if (lv->le_count || first_seg(lv)) {
|
||||
@ -2141,9 +2141,6 @@ static int _lv_insert_empty_sublvs(struct logical_volume *lv,
|
||||
/*
|
||||
* Next, create all of our sub_lv's and link them in.
|
||||
*/
|
||||
len = strlen(lv->name) + 32;
|
||||
if (!(img_name = dm_pool_alloc(lv->vg->cmd->mem, len)))
|
||||
return_0;
|
||||
if (dm_snprintf(img_name, len, "%s%s", lv->name, "_mimage_%d") < 0)
|
||||
return_0;
|
||||
|
||||
@ -2157,7 +2154,6 @@ static int _lv_insert_empty_sublvs(struct logical_volume *lv,
|
||||
}
|
||||
dm_list_add(&lv->segments, &mapseg->list);
|
||||
|
||||
dm_pool_free(lv->vg->cmd->mem, img_name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user