Blame SOURCES/0067-vdo-use-defines-also-for-configuration-defines.patch

5c9be1
From b16082b05639d4321cbf699d3309fe24a8bc71fa Mon Sep 17 00:00:00 2001
5c9be1
From: Zdenek Kabelac <zkabelac@redhat.com>
5c9be1
Date: Fri, 24 Jun 2022 15:54:08 +0200
5c9be1
Subject: [PATCH 2/3] vdo: use defines also for configuration defines
5c9be1
5c9be1
Keep single source for most of values printed in lvm.conf
5c9be1
(still needs some conversion)
5c9be1
5c9be1
Correct max for logical threads to 60
5c9be1
(we may refuse some older configuration which might eventually
5c9be1
user higher numbers - but so far let's assume no user have ever set this
5c9be1
as it's been non-trivial and if would complicate code unnecessarily.)
5c9be1
5c9be1
Accept maximum of 4PiB for virtual size of VDO LV
5c9be1
(lvm2 will drop 'header borders to 0 for this case').
5c9be1
5c9be1
(cherry picked from commit b5c8e591ed9ee30b67e79d60705d3c0bb8509a2a)
5c9be1
---
5c9be1
 conf/example.conf.in           |  9 +++---
5c9be1
 device_mapper/vdo/vdo_limits.h | 55 ++++++++++++++++++----------------
5c9be1
 device_mapper/vdo/vdo_target.c | 11 +++----
5c9be1
 lib/config/config_settings.h   | 32 +++++++++++++-------
5c9be1
 4 files changed, 60 insertions(+), 47 deletions(-)
5c9be1
5c9be1
diff --git a/conf/example.conf.in b/conf/example.conf.in
5c9be1
index a78ed7333..897622b9d 100644
5c9be1
--- a/conf/example.conf.in
5c9be1
+++ b/conf/example.conf.in
5c9be1
@@ -625,13 +625,12 @@ allocation {
5c9be1
 	# Enables or disables whether VDO volume should tag its latency-critical
5c9be1
 	# writes with the REQ_SYNC flag. Some device mapper targets such as dm-raid5
5c9be1
 	# process writes with this flag at a higher priority.
5c9be1
-	# Default is enabled.
5c9be1
 	# This configuration option has an automatic default value.
5c9be1
 	# vdo_use_metadata_hints = 1
5c9be1
 
5c9be1
 	# Configuration option allocation/vdo_minimum_io_size.
5c9be1
 	# The minimum IO size for VDO volume to accept, in bytes.
5c9be1
-	# Valid values are 512 or 4096. The recommended and default value is 4096.
5c9be1
+	# Valid values are 512 or 4096. The recommended value is 4096.
5c9be1
 	# This configuration option has an automatic default value.
5c9be1
 	# vdo_minimum_io_size = 4096
5c9be1
 
5c9be1
@@ -684,7 +683,7 @@ allocation {
5c9be1
 	# Configuration option allocation/vdo_bio_threads.
5c9be1
 	# Specifies the number of threads to use for submitting I/O
5c9be1
 	# operations to the storage device of VDO volume.
5c9be1
-	# The value must be in range [1..100]
5c9be1
+	# The value must be in range [1..100].
5c9be1
 	# Each additional thread after the first will use an additional 18MiB of RAM,
5c9be1
 	# plus 1.12 MiB of RAM per megabyte of configured read cache size.
5c9be1
 	# This configuration option has an automatic default value.
5c9be1
@@ -698,7 +697,7 @@ allocation {
5c9be1
 
5c9be1
 	# Configuration option allocation/vdo_cpu_threads.
5c9be1
 	# Specifies the number of threads to use for CPU-intensive work such as
5c9be1
-	# hashing or compression for VDO volume. The value must be in range [1..100]
5c9be1
+	# hashing or compression for VDO volume. The value must be in range [1..100].
5c9be1
 	# This configuration option has an automatic default value.
5c9be1
 	# vdo_cpu_threads = 2
5c9be1
 
5c9be1
@@ -716,7 +715,7 @@ allocation {
5c9be1
 	# processing based on the hash value computed from the block data.
5c9be1
 	# A logical thread count of 9 or more will require explicitly specifying
5c9be1
 	# a sufficiently large block map cache size, as well.
5c9be1
-	# The value must be in range [0..100].
5c9be1
+	# The value must be in range [0..60].
5c9be1
 	# vdo_hash_zone_threads, vdo_logical_threads and vdo_physical_threads must be
5c9be1
 	# either all zero or all non-zero.
5c9be1
 	# This configuration option has an automatic default value.
5c9be1
diff --git a/device_mapper/vdo/vdo_limits.h b/device_mapper/vdo/vdo_limits.h
5c9be1
index e145100b1..db365ace2 100644
5c9be1
--- a/device_mapper/vdo/vdo_limits.h
5c9be1
+++ b/device_mapper/vdo/vdo_limits.h
5c9be1
@@ -1,5 +1,5 @@
5c9be1
 /*
5c9be1
- * Copyright (C) 2018 Red Hat, Inc. All rights reserved.
5c9be1
+ * Copyright (C) 2018-2022 Red Hat, Inc. All rights reserved.
5c9be1
  *
5c9be1
  * This file is part of the device-mapper userspace tools.
5c9be1
  *
5c9be1
@@ -15,49 +15,52 @@
5c9be1
 #ifndef DEVICE_MAPPER_VDO_LIMITS_H
5c9be1
 #define DEVICE_MAPPER_VDO_LIMITS_H
5c9be1
 
5c9be1
+#ifndef SECTOR_SHIFT
5c9be1
+#define SECTOR_SHIFT 9L
5c9be1
+#endif
5c9be1
+
5c9be1
 #define DM_VDO_BLOCK_SIZE			UINT64_C(8)		// 4KiB in sectors
5c9be1
+#define DM_VDO_BLOCK_SIZE_KB			(DM_VDO_BLOCK_SIZE << SECTOR_SHIFT)
5c9be1
 
5c9be1
 #define DM_VDO_BLOCK_MAP_CACHE_SIZE_MINIMUM_MB	(128)			// 128MiB
5c9be1
 #define DM_VDO_BLOCK_MAP_CACHE_SIZE_MAXIMUM_MB	(16 * 1024 * 1024 - 1)	// 16TiB - 1
5c9be1
 #define DM_VDO_BLOCK_MAP_CACHE_SIZE_MINIMUM_PER_LOGICAL_THREAD  (4096 * DM_VDO_BLOCK_SIZE_KB)
5c9be1
 
5c9be1
-#define DM_VDO_BLOCK_MAP_ERA_LENGTH_MINIMUM	(1)
5c9be1
-#define DM_VDO_BLOCK_MAP_ERA_LENGTH_MAXIMUM	(16380)
5c9be1
+#define DM_VDO_BLOCK_MAP_ERA_LENGTH_MINIMUM	1
5c9be1
+#define DM_VDO_BLOCK_MAP_ERA_LENGTH_MAXIMUM	16380
5c9be1
 
5c9be1
-#define DM_VDO_INDEX_MEMORY_SIZE_MINIMUM_MB	(256)			// 0.25 GiB
5c9be1
+#define DM_VDO_INDEX_MEMORY_SIZE_MINIMUM_MB	256			// 0.25 GiB
5c9be1
 #define DM_VDO_INDEX_MEMORY_SIZE_MAXIMUM_MB	(1024 * 1024 * 1024)	// 1TiB
5c9be1
 
5c9be1
-//#define DM_VDO_READ_CACHE_SIZE_MINIMUM_MB	(0)
5c9be1
-#define DM_VDO_READ_CACHE_SIZE_MAXIMUM_MB	(16 * 1024 * 1024 - 1)	// 16TiB - 1
5c9be1
-
5c9be1
-#define DM_VDO_SLAB_SIZE_MINIMUM_MB		(128)			// 128MiB
5c9be1
+#define DM_VDO_SLAB_SIZE_MINIMUM_MB		128			// 128MiB
5c9be1
 #define DM_VDO_SLAB_SIZE_MAXIMUM_MB		(32 * 1024)		// 32GiB
5c9be1
+#define DM_VDO_SLABS_MAXIMUM			8192
5c9be1
 
5c9be1
-//#define DM_VDO_LOGICAL_SIZE_MINIMUM_MB	(0)
5c9be1
-#define DM_VDO_LOGICAL_SIZE_MAXIMUM_MB	(UINT64_C(4) * 1024 * 1024 * 1024) // 4PiB
5c9be1
+#define DM_VDO_LOGICAL_SIZE_MAXIMUM	(UINT64_C(4) * 1024 * 1024 * 1024 * 1024 * 1024 >> SECTOR_SHIFT) // 4PiB
5c9be1
+#define DM_VDO_PHYSICAL_SIZE_MAXIMUM	(UINT64_C(64) * DM_VDO_BLOCK_SIZE_KB * 1024 * 1024 * 1024 >> SECTOR_SHIFT) // 256TiB
5c9be1
 
5c9be1
-//#define DM_VDO_ACK_THREADS_MINIMUM		(0)
5c9be1
-#define DM_VDO_ACK_THREADS_MAXIMUM		(100)
5c9be1
+#define DM_VDO_ACK_THREADS_MINIMUM		0
5c9be1
+#define DM_VDO_ACK_THREADS_MAXIMUM		100
5c9be1
 
5c9be1
-#define DM_VDO_BIO_THREADS_MINIMUM		(1)
5c9be1
-#define DM_VDO_BIO_THREADS_MAXIMUM		(100)
5c9be1
+#define DM_VDO_BIO_THREADS_MINIMUM		1
5c9be1
+#define DM_VDO_BIO_THREADS_MAXIMUM		100
5c9be1
 
5c9be1
-#define DM_VDO_BIO_ROTATION_MINIMUM		(1)
5c9be1
-#define DM_VDO_BIO_ROTATION_MAXIMUM		(1024)
5c9be1
+#define DM_VDO_BIO_ROTATION_MINIMUM		1
5c9be1
+#define DM_VDO_BIO_ROTATION_MAXIMUM		1024
5c9be1
 
5c9be1
-#define DM_VDO_CPU_THREADS_MINIMUM		(1)
5c9be1
-#define DM_VDO_CPU_THREADS_MAXIMUM		(100)
5c9be1
+#define DM_VDO_CPU_THREADS_MINIMUM		1
5c9be1
+#define DM_VDO_CPU_THREADS_MAXIMUM		100
5c9be1
 
5c9be1
-//#define DM_VDO_HASH_ZONE_THREADS_MINIMUM	(0)
5c9be1
-#define DM_VDO_HASH_ZONE_THREADS_MAXIMUM	(100)
5c9be1
+#define DM_VDO_HASH_ZONE_THREADS_MINIMUM	0
5c9be1
+#define DM_VDO_HASH_ZONE_THREADS_MAXIMUM	100
5c9be1
 
5c9be1
-//#define DM_VDO_LOGICAL_THREADS_MINIMUM	(0)
5c9be1
-#define DM_VDO_LOGICAL_THREADS_MAXIMUM		(100)
5c9be1
+#define DM_VDO_LOGICAL_THREADS_MINIMUM		0
5c9be1
+#define DM_VDO_LOGICAL_THREADS_MAXIMUM		60
5c9be1
 
5c9be1
-//#define DM_VDO_PHYSICAL_THREADS_MINIMUM	(0)
5c9be1
-#define DM_VDO_PHYSICAL_THREADS_MAXIMUM		(16)
5c9be1
+#define DM_VDO_PHYSICAL_THREADS_MINIMUM		0
5c9be1
+#define DM_VDO_PHYSICAL_THREADS_MAXIMUM		16
5c9be1
 
5c9be1
-#define DM_VDO_MAX_DISCARD_MINIMUM		(1)
5c9be1
-#define DM_VDO_MAX_DISCARD_MAXIMUM		(UINT32_MAX / 4096)
5c9be1
+#define DM_VDO_MAX_DISCARD_MINIMUM		1
5c9be1
+#define DM_VDO_MAX_DISCARD_MAXIMUM		(UINT32_MAX / (uint32_t)(DM_VDO_BLOCK_SIZE_KB))
5c9be1
 
5c9be1
 #endif // DEVICE_MAPPER_VDO_LIMITS_H
5c9be1
diff --git a/device_mapper/vdo/vdo_target.c b/device_mapper/vdo/vdo_target.c
5c9be1
index 0e5abd162..3ebe0592e 100644
5c9be1
--- a/device_mapper/vdo/vdo_target.c
5c9be1
+++ b/device_mapper/vdo/vdo_target.c
5c9be1
@@ -18,14 +18,15 @@
5c9be1
 #include "vdo_limits.h"
5c9be1
 #include "target.h"
5c9be1
 
5c9be1
+/* validate vdo target parameters and  'vdo_size' in sectors */
5c9be1
 bool dm_vdo_validate_target_params(const struct dm_vdo_target_params *vtp,
5c9be1
 				   uint64_t vdo_size)
5c9be1
 {
5c9be1
 	bool valid = true;
5c9be1
 
5c9be1
 	/* 512 or 4096 bytes only ATM */
5c9be1
-	if ((vtp->minimum_io_size != 1) &&
5c9be1
-	    (vtp->minimum_io_size != 8)) {
5c9be1
+	if ((vtp->minimum_io_size != (512 >> SECTOR_SHIFT)) &&
5c9be1
+	    (vtp->minimum_io_size != (4096 >> SECTOR_SHIFT))) {
5c9be1
 		log_error("VDO minimum io size %u is unsupported.",
5c9be1
 			  vtp->minimum_io_size);
5c9be1
 		valid = false;
5c9be1
@@ -127,10 +128,10 @@ bool dm_vdo_validate_target_params(const struct dm_vdo_target_params *vtp,
5c9be1
 		valid = false;
5c9be1
 	}
5c9be1
 
5c9be1
-	if (vdo_size >= (DM_VDO_LOGICAL_SIZE_MAXIMUM_MB * UINT64_C(1024 * 2))) {
5c9be1
+	if (vdo_size > DM_VDO_LOGICAL_SIZE_MAXIMUM) {
5c9be1
 		log_error("VDO logical size is by " FMTu64 "KiB bigger then limit " FMTu64 "TiB.",
5c9be1
-			  (vdo_size - (DM_VDO_LOGICAL_SIZE_MAXIMUM_MB * UINT64_C(1024 * 2))) / 2,
5c9be1
-			  DM_VDO_LOGICAL_SIZE_MAXIMUM_MB / UINT64_C(1024) / UINT64_C(1024));
5c9be1
+			  (vdo_size - DM_VDO_LOGICAL_SIZE_MAXIMUM) / 2,
5c9be1
+			  DM_VDO_LOGICAL_SIZE_MAXIMUM / (UINT64_C(1024) * 1024 * 1024 * 1024 >> SECTOR_SHIFT));
5c9be1
 		valid = false;
5c9be1
 	}
5c9be1
 
5c9be1
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
5c9be1
index d280e7adb..2c91e8bb6 100644
5c9be1
--- a/lib/config/config_settings.h
5c9be1
+++ b/lib/config/config_settings.h
5c9be1
@@ -118,6 +118,7 @@
5c9be1
  * the previous default value was set (uncommented) in lvm.conf.
5c9be1
  */
5c9be1
 #include "lib/config/defaults.h"
5c9be1
+#include "device_mapper/vdo/vdo_limits.h"
5c9be1
 
5c9be1
 cfg_section(root_CFG_SECTION, "(root)", root_CFG_SECTION, 0, vsn(0, 0, 0), 0, NULL, NULL)
5c9be1
 
5c9be1
@@ -708,12 +709,11 @@ cfg(allocation_vdo_use_deduplication_CFG, "vdo_use_deduplication", allocation_CF
5c9be1
 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,
5c9be1
 	"Enables or disables whether VDO volume should tag its latency-critical\n"
5c9be1
 	"writes with the REQ_SYNC flag. Some device mapper targets such as dm-raid5\n"
5c9be1
-	"process writes with this flag at a higher priority.\n"
5c9be1
-	"Default is enabled.\n")
5c9be1
+	"process writes with this flag at a higher priority.\n")
5c9be1
 
5c9be1
 cfg(allocation_vdo_minimum_io_size_CFG, "vdo_minimum_io_size", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_MINIMUM_IO_SIZE, VDO_1ST_VSN, NULL, 0, NULL,
5c9be1
 	"The minimum IO size for VDO volume to accept, in bytes.\n"
5c9be1
-	"Valid values are 512 or 4096. The recommended and default value is 4096.\n")
5c9be1
+	"Valid values are 512 or 4096. The recommended value is 4096.\n")
5c9be1
 
5c9be1
 cfg(allocation_vdo_block_map_cache_size_mb_CFG, "vdo_block_map_cache_size_mb", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_BLOCK_MAP_CACHE_SIZE_MB, VDO_1ST_VSN, NULL, 0, NULL,
5c9be1
 	"Specifies the amount of memory in MiB allocated for caching block map\n"
5c9be1
@@ -726,7 +726,8 @@ cfg(allocation_vdo_block_map_era_length_CFG, "vdo_block_map_period", allocation_
5c9be1
 	"The speed with which the block map cache writes out modified block map pages.\n"
5c9be1
 	"A smaller era length is likely to reduce the amount time spent rebuilding,\n"
5c9be1
 	"at the cost of increased block map writes during normal operation.\n"
5c9be1
-	"The maximum and recommended value is 16380; the minimum value is 1.\n")
5c9be1
+	"The maximum and recommended value is " DM_TO_STRING(DM_VDO_BLOCK_MAP_ERA_LENGTH_MAXIMUM)
5c9be1
+	"; the minimum value is " DM_TO_STRING(DM_VDO_BLOCK_MAP_ERA_LENGTH_MINIMUM) ".\n")
5c9be1
 
5c9be1
 cfg(allocation_vdo_check_point_frequency_CFG, "vdo_check_point_frequency", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_CHECK_POINT_FREQUENCY, VDO_1ST_VSN, NULL, 0, NULL,
5c9be1
 	"The default check point frequency for VDO volume.\n")
5c9be1
@@ -748,27 +749,34 @@ cfg(allocation_vdo_slab_size_mb_CFG, "vdo_slab_size_mb", allocation_CFG_SECTION,
5c9be1
 cfg(allocation_vdo_ack_threads_CFG, "vdo_ack_threads", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_ACK_THREADS, VDO_1ST_VSN, NULL, 0, NULL,
5c9be1
 	"Specifies the number of threads to use for acknowledging\n"
5c9be1
 	"completion of requested VDO I/O operations.\n"
5c9be1
-	"The value must be at in range [0..100].\n")
5c9be1
+	"The value must be at in range [" DM_TO_STRING(DM_VDO_ACK_THREADS_MINIMUM) ".."
5c9be1
+	DM_TO_STRING(DM_VDO_ACK_THREADS_MAXIMUM) "].\n")
5c9be1
 
5c9be1
 cfg(allocation_vdo_bio_threads_CFG, "vdo_bio_threads", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_BIO_THREADS, VDO_1ST_VSN, NULL, 0, NULL,
5c9be1
 	"Specifies the number of threads to use for submitting I/O\n"
5c9be1
 	"operations to the storage device of VDO volume.\n"
5c9be1
-	"The value must be in range [1..100]\n"
5c9be1
+	"The value must be in range [" DM_TO_STRING(DM_VDO_BIO_THREADS_MINIMUM) ".."
5c9be1
+	DM_TO_STRING(DM_VDO_BIO_THREADS_MAXIMUM) "].\n"
5c9be1
 	"Each additional thread after the first will use an additional 18MiB of RAM,\n"
5c9be1
 	"plus 1.12 MiB of RAM per megabyte of configured read cache size.\n")
5c9be1
 
5c9be1
 cfg(allocation_vdo_bio_rotation_CFG, "vdo_bio_rotation", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_BIO_ROTATION, VDO_1ST_VSN, NULL, 0, NULL,
5c9be1
 	"Specifies the number of I/O operations to enqueue for each bio-submission\n"
5c9be1
-	"thread before directing work to the next. The value must be in range [1..1024].\n")
5c9be1
+	"thread before directing work to the next. The value must be in range ["
5c9be1
+	DM_TO_STRING(DM_VDO_BIO_ROTATION_MINIMUM) ".."
5c9be1
+	DM_TO_STRING(DM_VDO_BIO_ROTATION_MAXIMUM) "].\n")
5c9be1
 
5c9be1
 cfg(allocation_vdo_cpu_threads_CFG, "vdo_cpu_threads", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_CPU_THREADS, VDO_1ST_VSN, NULL, 0, NULL,
5c9be1
 	"Specifies the number of threads to use for CPU-intensive work such as\n"
5c9be1
-	"hashing or compression for VDO volume. The value must be in range [1..100]\n")
5c9be1
+	"hashing or compression for VDO volume. The value must be in range ["
5c9be1
+	DM_TO_STRING(DM_VDO_CPU_THREADS_MINIMUM) ".."
5c9be1
+	DM_TO_STRING(DM_VDO_CPU_THREADS_MAXIMUM) "].\n")
5c9be1
 
5c9be1
 cfg(allocation_vdo_hash_zone_threads_CFG, "vdo_hash_zone_threads", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_HASH_ZONE_THREADS, VDO_1ST_VSN, NULL, 0, NULL,
5c9be1
 	"Specifies the number of threads across which to subdivide parts of the VDO\n"
5c9be1
 	"processing based on the hash value computed from the block data.\n"
5c9be1
-	"The value must be at in range [0..100].\n"
5c9be1
+	"The value must be at in range [" DM_TO_STRING(DM_VDO_HASH_ZONE_THREADS_MINIMUM) ".."
5c9be1
+	DM_TO_STRING(DM_VDO_HASH_ZONE_THREADS_MAXIMUM) "].\n"
5c9be1
 	"vdo_hash_zone_threads, vdo_logical_threads and vdo_physical_threads must be\n"
5c9be1
 	"either all zero or all non-zero.\n")
5c9be1
 
5c9be1
@@ -777,7 +785,8 @@ cfg(allocation_vdo_logical_threads_CFG, "vdo_logical_threads", allocation_CFG_SE
5c9be1
 	"processing based on the hash value computed from the block data.\n"
5c9be1
 	"A logical thread count of 9 or more will require explicitly specifying\n"
5c9be1
 	"a sufficiently large block map cache size, as well.\n"
5c9be1
-	"The value must be in range [0..100].\n"
5c9be1
+	"The value must be in range [" DM_TO_STRING(DM_VDO_LOGICAL_THREADS_MINIMUM) ".."
5c9be1
+	DM_TO_STRING(DM_VDO_LOGICAL_THREADS_MAXIMUM) "].\n"
5c9be1
 	"vdo_hash_zone_threads, vdo_logical_threads and vdo_physical_threads must be\n"
5c9be1
 	"either all zero or all non-zero.\n")
5c9be1
 
5c9be1
@@ -785,7 +794,8 @@ cfg(allocation_vdo_physical_threads_CFG, "vdo_physical_threads", allocation_CFG_
5c9be1
 	"Specifies the number of threads across which to subdivide parts of the VDO\n"
5c9be1
 	"processing based on physical block addresses.\n"
5c9be1
 	"Each additional thread after the first will use an additional 10MiB of RAM.\n"
5c9be1
-	"The value must be in range [0..16].\n"
5c9be1
+	"The value must be in range [" DM_TO_STRING(DM_VDO_PHYSICAL_THREADS_MINIMUM) ".."
5c9be1
+	DM_TO_STRING(DM_VDO_PHYSICAL_THREADS_MAXIMUM) "].\n"
5c9be1
 	"vdo_hash_zone_threads, vdo_logical_threads and vdo_physical_threads must be\n"
5c9be1
 	"either all zero or all non-zero.\n")
5c9be1
 
5c9be1
-- 
5c9be1
2.38.1
5c9be1