mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
pool: avoid using artificial name internally
This commit is contained in:
parent
3596558861
commit
e84b00964f
@ -916,7 +916,7 @@ struct lv_status_thin {
|
||||
const char *get_pool_discards_name(thin_discards_t discards);
|
||||
int set_pool_discards(thin_discards_t *discards, const char *str);
|
||||
struct logical_volume *alloc_pool_metadata(struct logical_volume *pool_lv,
|
||||
const char *name, uint32_t read_ahead,
|
||||
uint32_t read_ahead,
|
||||
uint32_t stripes, uint32_t stripe_size,
|
||||
uint32_t extents, alloc_policy_t alloc,
|
||||
struct dm_list *pvh);
|
||||
|
@ -607,7 +607,7 @@ bad:
|
||||
}
|
||||
|
||||
struct logical_volume *alloc_pool_metadata(struct logical_volume *pool_lv,
|
||||
const char *name, uint32_t read_ahead,
|
||||
uint32_t read_ahead,
|
||||
uint32_t stripes, uint32_t stripe_size,
|
||||
uint32_t extents, alloc_policy_t alloc,
|
||||
struct dm_list *pvh)
|
||||
@ -639,9 +639,6 @@ struct logical_volume *alloc_pool_metadata(struct logical_volume *pool_lv,
|
||||
if (!(metadata_lv = lv_create_single(pool_lv->vg, &lvc)))
|
||||
return_0;
|
||||
|
||||
if (!lv_rename_update(pool_lv->vg->cmd, metadata_lv, name, 0))
|
||||
return_0;
|
||||
|
||||
return metadata_lv;
|
||||
}
|
||||
|
||||
|
@ -3269,7 +3269,6 @@ static int _lvconvert_to_pool(struct cmd_context *cmd,
|
||||
meta_alloc = (alloc_policy_t) arg_uint_value(cmd, alloc_ARG, ALLOC_INHERIT);
|
||||
|
||||
if (!(metadata_lv = alloc_pool_metadata(lv,
|
||||
meta_name,
|
||||
meta_readahead,
|
||||
meta_stripes,
|
||||
meta_stripe_size,
|
||||
@ -3426,7 +3425,7 @@ static int _lvconvert_to_pool(struct cmd_context *cmd,
|
||||
* Rename deactivated metadata LV to have _tmeta suffix.
|
||||
* Implicit checks if metadata_lv is visible.
|
||||
*/
|
||||
if (pool_metadata_name &&
|
||||
if ((strcmp(metadata_lv->name, meta_name) != 0) &&
|
||||
!lv_rename_update(cmd, metadata_lv, meta_name, 0))
|
||||
goto_bad;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user