]> sourceware.org Git - lvm2.git/commitdiff
cleanup: remove thin low_water_mark from metadata
authorZdenek Kabelac <zkabelac@redhat.com>
Thu, 29 Oct 2015 11:07:24 +0000 (12:07 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Thu, 29 Oct 2015 11:14:20 +0000 (12:14 +0100)
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.

lib/metadata/lv_manip.c
lib/metadata/metadata-exported.h
lib/thin/thin.c
tools/lvconvert.c

index 8e20dfacc671a8e094497be446b8aa41a34834d0..2310bfae3f26fd0c7404a0e864fd52e3367c2e78 100644 (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)->zero_new_blocks = lp->zero ? 1 : 0;
                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,
                                                                lp->thin_chunk_size_calc_policy)) {
                        stack;
index 41838a8ad146e5ea714f3400e936d9bd88c37985..2d118f42a0975a8c94ecf7962d6e80fa1ff0b5f2 100644 (file)
@@ -454,7 +454,6 @@ struct lv_segment {
        struct lv_segment_area *meta_areas;     /* For RAID */
        struct logical_volume *metadata_lv;     /* For thin_pool */
        uint64_t transaction_id;                /* For thin_pool, thin */
-       uint64_t low_water_mark;                /* For thin_pool */
        unsigned zero_new_blocks;               /* For thin_pool */
        thin_discards_t discards;               /* For thin_pool */
        struct dm_list thin_messages;           /* For thin_pool */
index ad400ef062a0ae0babb19d9bba2926f174b3e4da..be7a6b42ff0ec7de8bf7b66b56f36ce97f0699ca 100644 (file)
@@ -118,10 +118,6 @@ static int _thin_pool_text_import(struct lv_segment *seg,
        else if (!set_pool_discards(&seg->discards, discards_str))
                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) ||
            (seg->chunk_size > DM_THIN_MAX_DATA_BLOCK_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;
        }
 
-       if (seg->low_water_mark)
-               outf(f, "low_water_mark = %" PRIu64, seg->low_water_mark);
-
        if (seg->zero_new_blocks)
                outf(f, "zero_new_blocks = 1");
 
index 0e061604cb8fc377c2e716da6e35e47244025b44..a7df26d1301bc1aa698dda87826cc528528f0a54 100644 (file)
@@ -3064,7 +3064,6 @@ static int _lvconvert_pool(struct cmd_context *cmd,
        /* FIXME: revert renamed LVs in fail path? */
        /* FIXME: any common code with metadata/thin_manip.c  extend_pool() ? */
 
-       seg->low_water_mark = 0;
        seg->transaction_id = 0;
 
 mda_write:
This page took 0.059571 seconds and 5 git commands to generate.