1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

cleanup: remove thin low_water_mark from metadata

This option could never have been printed in lvm2 metadata, so it could
be safely removed as it could have been set only as 0.

These configurable setting is supported via metadata profile.
This commit is contained in:
Zdenek Kabelac 2015-10-29 12:07:24 +01:00
parent 33a8a2febf
commit 175119fdcd
4 changed files with 0 additions and 11 deletions

View File

@ -7388,8 +7388,6 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
first_seg(lv)->chunk_size = lp->chunk_size; first_seg(lv)->chunk_size = lp->chunk_size;
first_seg(lv)->zero_new_blocks = lp->zero ? 1 : 0; first_seg(lv)->zero_new_blocks = lp->zero ? 1 : 0;
first_seg(lv)->discards = lp->discards; first_seg(lv)->discards = lp->discards;
/* FIXME: use lowwatermark via lvm.conf global for all thinpools ? */
first_seg(lv)->low_water_mark = 0;
if (!recalculate_pool_chunk_size_with_dev_hints(lv, lp->passed_args, if (!recalculate_pool_chunk_size_with_dev_hints(lv, lp->passed_args,
lp->thin_chunk_size_calc_policy)) { lp->thin_chunk_size_calc_policy)) {
stack; stack;

View File

@ -454,7 +454,6 @@ struct lv_segment {
struct lv_segment_area *meta_areas; /* For RAID */ struct lv_segment_area *meta_areas; /* For RAID */
struct logical_volume *metadata_lv; /* For thin_pool */ struct logical_volume *metadata_lv; /* For thin_pool */
uint64_t transaction_id; /* For thin_pool, thin */ uint64_t transaction_id; /* For thin_pool, thin */
uint64_t low_water_mark; /* For thin_pool */
unsigned zero_new_blocks; /* For thin_pool */ unsigned zero_new_blocks; /* For thin_pool */
thin_discards_t discards; /* For thin_pool */ thin_discards_t discards; /* For thin_pool */
struct dm_list thin_messages; /* For thin_pool */ struct dm_list thin_messages; /* For thin_pool */

View File

@ -118,10 +118,6 @@ static int _thin_pool_text_import(struct lv_segment *seg,
else if (!set_pool_discards(&seg->discards, discards_str)) else if (!set_pool_discards(&seg->discards, discards_str))
return SEG_LOG_ERROR("Discards option unsupported for"); return SEG_LOG_ERROR("Discards option unsupported for");
if (dm_config_has_node(sn, "low_water_mark") &&
!dm_config_get_uint64(sn, "low_water_mark", &seg->low_water_mark))
return SEG_LOG_ERROR("Could not read low_water_mark");
if ((seg->chunk_size < DM_THIN_MIN_DATA_BLOCK_SIZE) || if ((seg->chunk_size < DM_THIN_MIN_DATA_BLOCK_SIZE) ||
(seg->chunk_size > DM_THIN_MAX_DATA_BLOCK_SIZE)) (seg->chunk_size > DM_THIN_MAX_DATA_BLOCK_SIZE))
return SEG_LOG_ERROR("Unsupported value %u for chunk_size", return SEG_LOG_ERROR("Unsupported value %u for chunk_size",
@ -169,9 +165,6 @@ static int _thin_pool_text_export(const struct lv_segment *seg, struct formatter
return 0; return 0;
} }
if (seg->low_water_mark)
outf(f, "low_water_mark = %" PRIu64, seg->low_water_mark);
if (seg->zero_new_blocks) if (seg->zero_new_blocks)
outf(f, "zero_new_blocks = 1"); outf(f, "zero_new_blocks = 1");

View File

@ -3064,7 +3064,6 @@ static int _lvconvert_pool(struct cmd_context *cmd,
/* FIXME: revert renamed LVs in fail path? */ /* FIXME: revert renamed LVs in fail path? */
/* FIXME: any common code with metadata/thin_manip.c extend_pool() ? */ /* FIXME: any common code with metadata/thin_manip.c extend_pool() ? */
seg->low_water_mark = 0;
seg->transaction_id = 0; seg->transaction_id = 0;
mda_write: mda_write: