1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-05 13:18:20 +03:00

vdo: depcreate unused settings

This commit is contained in:
Zdenek Kabelac 2024-09-06 11:39:17 +02:00
parent e9413fb211
commit 7e2bb2a35e
9 changed files with 40 additions and 38 deletions

View File

@ -646,13 +646,6 @@ allocation {
# This configuration option has an automatic default value.
# vdo_use_deduplication = 1
# Configuration option allocation/vdo_use_metadata_hints.
# Enables or disables whether VDO volume should tag its latency-critical
# writes with the REQ_SYNC flag. Some device mapper targets such as dm-raid5
# process writes with this flag at a higher priority.
# This configuration option has an automatic default value.
# vdo_use_metadata_hints = 1
# Configuration option allocation/vdo_minimum_io_size.
# The minimum IO size for VDO volume to accept, in bytes.
# Valid values are 512 or 4096. The recommended value is 4096.
@ -751,19 +744,6 @@ allocation {
# This configuration option has an automatic default value.
# vdo_physical_threads = 1
# Configuration option allocation/vdo_write_policy.
# Specifies the write policy:
# auto - VDO will check the storage device and determine whether it supports flushes.
# If it does, VDO will run in async mode, otherwise it will run in sync mode.
# sync - Writes are acknowledged only after data is stably written.
# This policy is not supported if the underlying storage is not also synchronous.
# async - Writes are acknowledged after data has been cached for writing to stable storage.
# Data which has not been flushed is not guaranteed to persist in this mode.
# async-unsafe - Writes are handled like 'async' but there is no guarantee of the atomicity async provides.
# This mode should only be used for better performance when atomicity is not required.
# This configuration option has an automatic default value.
# vdo_write_policy = "auto"
# Configuration option allocation/vdo_max_discard.
# Specified the maximum size of discard bio accepted, in 4096 byte blocks.
# I/O requests to a VDO volume are normally split into 4096-byte blocks,

View File

@ -4,7 +4,6 @@
allocation {
vdo_use_compression=1
vdo_use_deduplication=1
vdo_use_metadata_hints=1
vdo_minimum_io_size=4096
vdo_block_map_cache_size_mb=128
vdo_block_map_period=16380
@ -18,6 +17,5 @@ allocation {
vdo_hash_zone_threads=1
vdo_logical_threads=1
vdo_physical_threads=1
vdo_write_policy="auto"
vdo_max_discard=1
}

View File

@ -2558,3 +2558,18 @@ uint64_t get_default_allocation_cache_pool_max_chunks_CFG(struct cmd_context *cm
return max_chunks;
}
int get_default_allocation_vdo_use_metadata_hints_CFG(struct cmd_context *cmd, struct profile *profile)
{
unsigned maj, min;
if ((sscanf(cmd->kernel_vsn, "%u.%u", &maj, &min) == 2) &&
((maj > 6) || ((maj == 6) && (min > 8)))) {
/* With kernels > 6.8 this feature is considered deprecated.
* Return false as default setting. */
return false;
}
/* With older kernels use the configured default setting. */
return DEFAULT_VDO_USE_METADATA_HINTS;
}

View File

@ -312,6 +312,8 @@ int get_default_allocation_cache_pool_chunk_size_CFG(struct cmd_context *cmd, st
const char *get_default_allocation_cache_policy_CFG(struct cmd_context *cmd, struct profile *profile);
#define get_default_unconfigured_allocation_cache_policy_CFG NULL
uint64_t get_default_allocation_cache_pool_max_chunks_CFG(struct cmd_context *cmd, struct profile *profile);
int get_default_allocation_vdo_use_metadata_hints_CFG(struct cmd_context *cmd, struct profile *profile);
#define get_default_unconfigured_allocation_vdo_use_metadata_hints_CFG NULL
int get_default_metadata_pvmetadatasize_CFG(struct cmd_context *cmd, struct profile *profile);
#define get_default_unconfigured_metadata_pvmetadatasize_CFG NULL

View File

@ -728,8 +728,8 @@ cfg(allocation_vdo_use_deduplication_CFG, "vdo_use_deduplication", allocation_CF
"Deduplication may be disabled in instances where data is not expected\n"
"to have good deduplication rates but compression is still desired.\n")
cfg(allocation_vdo_use_metadata_hints_CFG, "vdo_use_metadata_hints", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_USE_METADATA_HINTS, VDO_1ST_VSN, NULL, 0, NULL,
"Enables or disables whether VDO volume should tag its latency-critical\n"
cfg_runtime(allocation_vdo_use_metadata_hints_CFG, "vdo_use_metadata_hints", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, VDO_1ST_VSN, vsn(2, 3, 27), NULL,
"Deprecated enablement whether VDO volume should tag its latency-critical\n"
"writes with the REQ_SYNC flag. Some device mapper targets such as dm-raid5\n"
"process writes with this flag at a higher priority.\n")
@ -821,8 +821,8 @@ cfg(allocation_vdo_physical_threads_CFG, "vdo_physical_threads", allocation_CFG_
"vdo_hash_zone_threads, vdo_logical_threads and vdo_physical_threads must be\n"
"either all zero or all non-zero.\n")
cfg(allocation_vdo_write_policy_CFG, "vdo_write_policy", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_VDO_WRITE_POLICY, VDO_1ST_VSN, NULL, 0, NULL,
"Specifies the write policy:\n"
cfg(allocation_vdo_write_policy_CFG, "vdo_write_policy", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_VDO_WRITE_POLICY, VDO_1ST_VSN, NULL, vsn(2, 3, 27), NULL,
"Deprecated option to specify the write policy with these accepted values:\n"
"auto - VDO will check the storage device and determine whether it supports flushes.\n"
" If it does, VDO will run in async mode, otherwise it will run in sync mode.\n"
"sync - Writes are acknowledged only after data is stably written.\n"

View File

@ -572,6 +572,9 @@ int set_vdo_write_policy(enum dm_vdo_write_policy *vwp, const char *policy)
return 0;
}
if (*vwp != DM_VDO_WRITE_POLICY_AUTO)
log_info("Deprecated VDO setting write_policy specified.");
return 1;
}
@ -626,6 +629,9 @@ int fill_vdo_target_params(struct cmd_context *cmd,
*vdo_pool_header_size = 2 * find_config_tree_int64(cmd, allocation_vdo_pool_header_size_CFG, profile);
if (vtp->use_metadata_hints)
log_info("Deprecated VDO setting use_metadata_hints specified.");
return 1;
}

View File

@ -295,7 +295,6 @@ FIELD(SEGS, seg, STR_LIST, "IntegSettings", list, 0, integrity_settings, integri
FIELD(SEGS, seg, BIN, "VDOCompression", list, 0, vdo_compression, vdo_compression, "Set for compressed LV (vdopool).", 0)
FIELD(SEGS, seg, BIN, "VDODeduplication", list, 0, vdo_deduplication, vdo_deduplication, "Set for deduplicated LV (vdopool).", 0)
FIELD(SEGS, seg, BIN, "VDOMetadataHints", list, 0, vdo_use_metadata_hints, vdo_use_metadata_hints, "Use REQ_SYNC for writes (vdopool).", 0)
FIELD(SEGS, seg, NUM, "VDOMinimumIOSize", list, 0, vdo_minimum_io_size, vdo_minimum_io_size, "Minimum acceptable IO size (vdopool).", 0)
FIELD(SEGS, seg, SIZ, "VDOBlockMapCacheSize", list, 0, vdo_block_map_cache_size, vdo_block_map_cache_size, "Allocated caching size (vdopool).", 0)
FIELD(SEGS, seg, NUM, "VDOBlockMapEraLength", list, 0, vdo_block_map_era_length, vdo_block_map_era_length, "Speed of cache writes (vdopool).", 0)
@ -310,8 +309,9 @@ FIELD(SEGS, seg, NUM, "VDOHashZoneThreads", list, 0, vdo_hash_zone_threads, vdo_
FIELD(SEGS, seg, NUM, "VDOLogicalThreads", list, 0, vdo_logical_threads, vdo_logical_threads, "Logical threads for subdivide parts (vdopool).", 0)
FIELD(SEGS, seg, NUM, "VDOPhysicalThreads", list, 0, vdo_physical_threads, vdo_physical_threads, "Physical threads for subdivide parts (vdopool).", 0)
FIELD(SEGS, seg, NUM, "VDOMaxDiscard", list, 0, vdo_max_discard, vdo_max_discard, "Maximum discard size volume can receive (vdopool).", 0)
FIELD(SEGS, seg, STR, "VDOWritePolicy", list, 0, vdo_write_policy, vdo_write_policy, "Specified write policy (vdopool).", 0)
FIELD(SEGS, seg, SIZ, "VDOHeaderSize", list, 0, vdo_header_size, vdo_header_size, "Header size at front of vdopool.", 0)
FIELD(SEGS, seg, BIN, "VDOMetadataHints", list, 0, vdo_use_metadata_hints, vdo_use_metadata_hints, "Deprecated use of REQ_SYNC for writes (vdopool).", 0)
FIELD(SEGS, seg, STR, "VDOWritePolicy", list, 0, vdo_write_policy, vdo_write_policy, "Deprecated write policy (vdopool).", 0)
/*
* End of SEGS type fields

View File

@ -168,7 +168,8 @@ static void _vdo_pool_display(const struct lv_segment *seg)
_print_yes_no("Compression\t", vtp->use_compression);
_print_yes_no("Deduplication", vtp->use_deduplication);
_print_yes_no("Metadata hints", vtp->use_metadata_hints);
if (vtp->use_metadata_hints)
_print_yes_no("Metadata hints", vtp->use_metadata_hints);
log_print(" Minimum IO size\t%s",
display_size(cmd, vtp->minimum_io_size));
@ -192,7 +193,8 @@ static void _vdo_pool_display(const struct lv_segment *seg)
log_print(" # Logical threads\t%u", (unsigned) vtp->logical_threads);
log_print(" # Physical threads\t%u", (unsigned) vtp->physical_threads);
log_print(" Max discard\t\t%u", (unsigned) vtp->max_discard);
log_print(" Write policy\t%s", get_vdo_write_policy_name(vtp->write_policy));
if (vtp->write_policy != DM_VDO_WRITE_POLICY_AUTO)
log_print(" Write policy\t%s", get_vdo_write_policy_name(vtp->write_policy));
}
/* reused as _vdo_text_import_area_count */

View File

@ -41,12 +41,11 @@ block addresses that are mapped to the shared physical block are not
modified.
.P
To use VDO with \fBlvm\fP(8), you must install the standard VDO user-space tools
\fBvdoformat\fP(8) and the currently non-standard kernel VDO module
"\fIkvdo\fP".
\fBvdoformat\fP(8) and kernel module "\fIdm_vdo\fP" (For older kernels <6.9
the out of tree kernel VDO module "\fIkvdo\fP" is necessary).
.P
The "\fIkvdo\fP" module implements fine-grained storage virtualization,
thin provisioning, block sharing, and compression.
The "\fIuds\fP" module provides memory-efficient duplicate
The kernel module implements fine-grained storage virtualization,
thin provisioning, block sharing, compression and memory-efficient duplicate
identification. The user-space tools include \fBvdostats\fP(8)
for extracting statistics from VDO volumes.
.
@ -161,7 +160,6 @@ allocation {
.RS
vdo_use_compression=1
vdo_use_deduplication=1
vdo_use_metadata_hints=1
vdo_minimum_io_size=4096
vdo_block_map_cache_size_mb=128
vdo_block_map_period=16380
@ -175,7 +173,6 @@ vdo_cpu_threads=2
vdo_hash_zone_threads=1
vdo_logical_threads=1
vdo_physical_threads=1
vdo_write_policy="auto"
vdo_max_discard=1
.RE
}
@ -192,7 +189,7 @@ or repeat --vdosettings for each option being set.
Options are listed in the Example section above, for the full description see
.BR lvm.conf (5).
Options can omit 'vdo_' and 'vdo_use_' prefixes and all its underscores.
So i.e. vdo_use_metadata_hints=1 and metadatahints=1 are equivalent.
So i.e. vdo_use_deduplication=1 and deduplication=1 are equivalent.
To change the option for an already existing VDOPoolLV use
.BR lvchange (8)
command. However not all option can be changed.
@ -307,6 +304,7 @@ volume types: linear, stripe, raid and cache with cachepool.
You can convert existing VDO LV into a thin volume. After this conversion
you can create a thin snapshot or you can add more thin volumes
with thin-pool named after original LV name LV_tpool0.
See \fBlvmthin\fP(7) for more details.
.P
.I Example
.nf
@ -441,6 +439,7 @@ a dense UDS index uses 17 GiB of storage and a sparse UDS index will use
.BR lvremove (8),
.BR lvs (8),
.P
.BR lvmthin (7),
.BR vdoformat (8),
.BR vdostats (8),
.P