mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
thin: rename extend_pool to create_pool
This commit is contained in:
parent
3670fe92ba
commit
84801d7c34
@ -2868,7 +2868,7 @@ int lv_extend(struct logical_volume *lv,
|
||||
|
||||
if (segtype_is_thin_pool(segtype)) {
|
||||
if (!lv->le_count) {
|
||||
if (!(r = extend_pool(lv, segtype, ah, stripes, stripe_size)))
|
||||
if (!(r = create_pool(lv, segtype, ah, stripes, stripe_size)))
|
||||
stack;
|
||||
} else if (!(r = _lv_extend_layered_lv(ah, lv, extents, 0,
|
||||
stripes, stripe_size)))
|
||||
|
@ -470,7 +470,7 @@ int attach_pool_message(struct lv_segment *pool_seg, dm_thin_message_t type,
|
||||
int pool_has_message(const struct lv_segment *seg,
|
||||
const struct logical_volume *lv, uint32_t device_id);
|
||||
int pool_below_threshold(const struct lv_segment *pool_seg);
|
||||
int extend_pool(struct logical_volume *lv, const struct segment_type *segtype,
|
||||
int create_pool(struct logical_volume *lv, const struct segment_type *segtype,
|
||||
struct alloc_handle *ah, uint32_t stripes, uint32_t stripe_size);
|
||||
|
||||
/*
|
||||
|
@ -425,8 +425,7 @@ uint32_t get_free_pool_device_id(struct lv_segment *thin_pool_seg)
|
||||
return max_id;
|
||||
}
|
||||
|
||||
// FIXME Rename this fn: it doesn't extend an already-existing pool AFAICT
|
||||
int extend_pool(struct logical_volume *pool_lv, const struct segment_type *segtype,
|
||||
int create_pool(struct logical_volume *pool_lv, const struct segment_type *segtype,
|
||||
struct alloc_handle *ah, uint32_t stripes, uint32_t stripe_size)
|
||||
{
|
||||
const struct segment_type *striped;
|
||||
@ -455,7 +454,9 @@ int extend_pool(struct logical_volume *pool_lv, const struct segment_type *segty
|
||||
if (!lv_add_segment(ah, stripes, 1, pool_lv, striped, 1, 0, 0))
|
||||
return_0;
|
||||
|
||||
if (activation()) {
|
||||
if (!activation())
|
||||
log_warn("WARNING: Pool %s is created without initialization.", pool_lv->name);
|
||||
else {
|
||||
if (!vg_write(pool_lv->vg) || !vg_commit(pool_lv->vg))
|
||||
return_0;
|
||||
|
||||
@ -474,8 +475,6 @@ int extend_pool(struct logical_volume *pool_lv, const struct segment_type *segty
|
||||
pool_lv->name);
|
||||
goto bad;
|
||||
}
|
||||
} else {
|
||||
log_warn("WARNING: Pool %s is created without initialization.", pool_lv->name);
|
||||
}
|
||||
|
||||
if (dm_snprintf(name, sizeof(name), "%s_tmeta", pool_lv->name) < 0) {
|
||||
@ -512,6 +511,7 @@ int extend_pool(struct logical_volume *pool_lv, const struct segment_type *segty
|
||||
goto_bad;
|
||||
|
||||
return 1;
|
||||
|
||||
bad:
|
||||
if (activation()) {
|
||||
if (deactivate_lv_local(pool_lv->vg->cmd, pool_lv)) {
|
||||
|
Loading…
Reference in New Issue
Block a user