]> sourceware.org Git - lvm2.git/commit
lvmconfig: add supporting code for handling deprecated settings
authorPeter Rajnoha <prajnoha@redhat.com>
Thu, 30 Apr 2015 15:40:24 +0000 (17:40 +0200)
committerPeter Rajnoha <prajnoha@redhat.com>
Thu, 30 Apr 2015 15:55:04 +0000 (17:55 +0200)
commitfc65269d682cb7bcaf14c94ec4541e7af4c27165
tree7462b515ea10be46b60844660b458e14183de7f6
parent5a0197121b07b8a2318000872d4b6916c2176ef9
lvmconfig: add supporting code for handling deprecated settings

This patch adds supporting code for handling deprecated settings.

Deprecated settings are not displayed by default in lvmconfig output
(except for --type current and --type diff). There's a new
"--showdeprecated" lvmconfig option to display them if needed.

Also, when using lvmconfig --withcomments, the comments with info
about deprecation are displayed for deprecated settings and with
lvmconfig --withversions, the version in which the setting was
deprecated is displayed in addition to the version of introduction.

If using --atversion with a version that is lower than the one
in which the setting was deprecated, the setting is then considered
as not deprecated (simply because at that version it was not
deprecated).

For example:

$ lvmconfig --type default activation
activation {
        ...
raid_region_size=512
        ...
}

$ lvmconfig --type default activation --showdeprecated
activation {
        ...
mirror_region_size=512
raid_region_size=512
        ...
}

$ lvmconfig --type default activation --showdeprecated --withversions
activation {
        ...
# Available since version 1.0.0.
# Deprecated since version 2.2.99.
mirror_region_size=512
# Available since version 2.2.99.
raid_region_size=512
        ...
}

$ lvmconfig --type default activation --showdeprecated --withcomments
activation {
        ...
# Configuration option activation/mirror_region_size.
# This has been replaced by the activation/raid_region_size
# setting.
# Size (in KB) of each copy operation when mirroring.
# This configuration option is deprecated.
mirror_region_size=512

# Configuration option activation/raid_region_size.
# Size in KiB of each raid or mirror synchronization region.
# For raid or mirror segment types, this is the amount of
# data that is copied at once when initializing, or moved
# at once by pvmove.
raid_region_size=512
        ...
}

$ lvmconfig --type default activation --withcomments --atversion 2.2.98
activation {
       ...
       # Configuration option activation/mirror_region_size.
       # Size (in KB) of each copy operation when mirroring.
       mirror_region_size=512
       ...
}
WHATS_NEW
lib/config/config.c
lib/config/config.h
man/lvmconfig.8.in
tools/args.h
tools/commands.h
tools/dumpconfig.c
This page took 0.038749 seconds and 5 git commands to generate.