mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
thin_pool: correct refactoring chunk_size
Function to recalc chunk_size according to dev hints needs to be used after chunk_size is being set to thin pool segment - correct this ordering mistake introduced in previous refactoring commit.
This commit is contained in:
parent
9d9e43b87f
commit
5533f034e2
@ -783,6 +783,7 @@ int thin_pool_set_params(struct lv_segment *seg,
|
|||||||
thin_discards_t discards,
|
thin_discards_t discards,
|
||||||
thin_zero_t zero_new_blocks)
|
thin_zero_t zero_new_blocks)
|
||||||
{
|
{
|
||||||
|
seg->chunk_size = chunk_size;
|
||||||
if (!recalculate_pool_chunk_size_with_dev_hints(seg->lv, seg_lv(seg, 0),
|
if (!recalculate_pool_chunk_size_with_dev_hints(seg->lv, seg_lv(seg, 0),
|
||||||
thin_chunk_size_calc_policy))
|
thin_chunk_size_calc_policy))
|
||||||
return_0;
|
return_0;
|
||||||
@ -793,7 +794,6 @@ int thin_pool_set_params(struct lv_segment *seg,
|
|||||||
if ((seg->crop_metadata = crop_metadata) == THIN_CROP_METADATA_NO)
|
if ((seg->crop_metadata = crop_metadata) == THIN_CROP_METADATA_NO)
|
||||||
seg->lv->status |= LV_CROP_METADATA;
|
seg->lv->status |= LV_CROP_METADATA;
|
||||||
|
|
||||||
seg->chunk_size = chunk_size;
|
|
||||||
seg->discards = discards;
|
seg->discards = discards;
|
||||||
seg->zero_new_blocks = zero_new_blocks;
|
seg->zero_new_blocks = zero_new_blocks;
|
||||||
seg->transaction_id = 0;
|
seg->transaction_id = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user