mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Thin support for stripe
Support stripe options to create thin data pool LV. TODO: combine chunk size and stripe size.
This commit is contained in:
parent
daa10ad0fd
commit
0968dfcd03
@ -2570,7 +2570,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)))
|
||||
if (!(r = extend_pool(lv, segtype, ah, stripes, stripe_size)))
|
||||
stack;
|
||||
} else if (!(r = _lv_extend_layered_lv(ah, lv, extents, 0,
|
||||
stripes, stripe_size)))
|
||||
|
@ -463,7 +463,7 @@ int attach_pool_message(struct lv_segment *seg, dm_thin_message_t type,
|
||||
int read_only);
|
||||
int detach_pool_messages(struct lv_segment *seg);
|
||||
int extend_pool(struct logical_volume *lv, const struct segment_type *segtype,
|
||||
struct alloc_handle *ah);
|
||||
struct alloc_handle *ah, uint32_t stripes, uint32_t stripe_size);
|
||||
|
||||
/*
|
||||
* Begin skeleton for external LVM library
|
||||
|
@ -220,7 +220,7 @@ uint32_t get_free_pool_device_id(struct lv_segment *thin_pool_seg)
|
||||
}
|
||||
|
||||
int extend_pool(struct logical_volume *pool_lv, const struct segment_type *segtype,
|
||||
struct alloc_handle *ah)
|
||||
struct alloc_handle *ah, uint32_t stripes, uint32_t stripe_size)
|
||||
{
|
||||
const struct segment_type *striped;
|
||||
struct logical_volume *meta_lv, *data_lv;
|
||||
@ -245,7 +245,7 @@ int extend_pool(struct logical_volume *pool_lv, const struct segment_type *segty
|
||||
}
|
||||
|
||||
/* Metadata segment */
|
||||
if (!lv_add_segment(ah, 1, 1, pool_lv, striped, 1, 0, 0))
|
||||
if (!lv_add_segment(ah, stripes, 1, pool_lv, striped, 1, 0, 0))
|
||||
return_0;
|
||||
|
||||
if (activation()) {
|
||||
@ -290,7 +290,7 @@ int extend_pool(struct logical_volume *pool_lv, const struct segment_type *segty
|
||||
return_0;
|
||||
|
||||
/* Pool data segment */
|
||||
if (!lv_add_segment(ah, 0, 1, pool_lv, striped, 1, 0, 0))
|
||||
if (!lv_add_segment(ah, 0, stripes, pool_lv, striped, stripe_size, 0, 0))
|
||||
return_0;
|
||||
|
||||
if (!(data_lv = insert_layer_for_lv(pool_lv->vg->cmd, pool_lv,
|
||||
|
Loading…
Reference in New Issue
Block a user