xref: /linux/drivers/md/Kconfig (revision 0fc8f6200d2313278fbf4539bbab74677c685531)
1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
21da177e4SLinus Torvalds#
31da177e4SLinus Torvalds# Block device driver configuration
41da177e4SLinus Torvalds#
51da177e4SLinus Torvalds
6afd44034SJan Engelhardtmenuconfig MD
71da177e4SLinus Torvalds	bool "Multiple devices driver support (RAID and LVM)"
8afd44034SJan Engelhardt	depends on BLOCK
91da177e4SLinus Torvalds	help
101da177e4SLinus Torvalds	  Support multiple physical spindles through a single logical device.
111da177e4SLinus Torvalds	  Required for RAID and logical volume management.
121da177e4SLinus Torvalds
13afd44034SJan Engelhardtif MD
14afd44034SJan Engelhardt
151da177e4SLinus Torvaldsconfig BLK_DEV_MD
161da177e4SLinus Torvalds	tristate "RAID support"
17c66fd019SChristoph Hellwig	select BLOCK_HOLDER_DEPRECATED if SYSFS
18925c86a1SChristoph Hellwig	select BUFFER_HEAD
196c0f5898SNeilBrown	# BLOCK_LEGACY_AUTOLOAD requirement should be removed
206c0f5898SNeilBrown	# after relevant mdadm enhancements - to make "names=yes"
216c0f5898SNeilBrown	# the default - are widely available.
226c0f5898SNeilBrown	select BLOCK_LEGACY_AUTOLOAD
23a7f7f624SMasahiro Yamada	help
241da177e4SLinus Torvalds	  This driver lets you combine several hard disk partitions into one
251da177e4SLinus Torvalds	  logical block device. This can be used to simply append one
261da177e4SLinus Torvalds	  partition to another one or to combine several redundant hard disks
271da177e4SLinus Torvalds	  into a RAID1/4/5 device so as to provide protection against hard
281da177e4SLinus Torvalds	  disk failures. This is called "Software RAID" since the combining of
291da177e4SLinus Torvalds	  the partitions is done by the kernel. "Hardware RAID" means that the
301da177e4SLinus Torvalds	  combining is done by a dedicated controller; if you have such a
311da177e4SLinus Torvalds	  controller, you do not need to say Y here.
321da177e4SLinus Torvalds
331da177e4SLinus Torvalds	  More information about Software RAID on Linux is contained in the
341da177e4SLinus Torvalds	  Software RAID mini-HOWTO, available from
356f3bc22bSAlexander A. Klimov	  <https://www.tldp.org/docs.html#howto>. There you will also learn
361da177e4SLinus Torvalds	  where to get the supporting user space utilities raidtools.
371da177e4SLinus Torvalds
381da177e4SLinus Torvalds	  If unsure, say N.
391da177e4SLinus Torvalds
40c27474acSYu Kuaiconfig MD_BITMAP
41c27474acSYu Kuai	bool "MD RAID bitmap support"
42c27474acSYu Kuai	default y
43c27474acSYu Kuai	depends on BLK_DEV_MD
44c27474acSYu Kuai	help
45c27474acSYu Kuai	  If you say Y here, support for the write intent bitmap will be
46c27474acSYu Kuai	  enabled. The bitmap can be used to optimize resync speed after power
47c27474acSYu Kuai	  failure or readding a disk, limiting it to recorded dirty sectors in
48c27474acSYu Kuai	  bitmap.
49c27474acSYu Kuai
50c27474acSYu Kuai	  This feature can be added to existing MD array or MD array can be
51c27474acSYu Kuai	  created with bitmap via mdadm(8).
52c27474acSYu Kuai
53c27474acSYu Kuai	  If unsure, say Y.
54c27474acSYu Kuai
555ab829f1SYu Kuaiconfig MD_LLBITMAP
565ab829f1SYu Kuai	bool "MD RAID lockless bitmap support"
575ab829f1SYu Kuai	depends on BLK_DEV_MD
585ab829f1SYu Kuai	help
595ab829f1SYu Kuai	  If you say Y here, support for the lockless write intent bitmap will
605ab829f1SYu Kuai	  be enabled.
615ab829f1SYu Kuai
625ab829f1SYu Kuai	  Note, this is an experimental feature.
635ab829f1SYu Kuai
645ab829f1SYu Kuai	  If unsure, say N.
655ab829f1SYu Kuai
66a364092aSArjan van de Venconfig MD_AUTODETECT
67a364092aSArjan van de Ven	bool "Autodetect RAID arrays during kernel boot"
68ce52aebdSAlan Jenkins	depends on BLK_DEV_MD=y
69a364092aSArjan van de Ven	default y
70a7f7f624SMasahiro Yamada	help
71a364092aSArjan van de Ven	  If you say Y here, then the kernel will try to autodetect raid
72a364092aSArjan van de Ven	  arrays as part of its boot process.
73a364092aSArjan van de Ven
74a364092aSArjan van de Ven	  If you don't use raid and say Y, this autodetection can cause
75a364092aSArjan van de Ven	  a several-second delay in the boot time due to various
76a364092aSArjan van de Ven	  synchronisation steps that are part of this step.
77a364092aSArjan van de Ven
78a364092aSArjan van de Ven	  If unsure, say Y.
79a364092aSArjan van de Ven
80a34d4ef8SChristoph Hellwigconfig MD_BITMAP_FILE
810ae1c9d3SChristoph Hellwig	bool "MD bitmap file support (deprecated)"
82a34d4ef8SChristoph Hellwig	default y
83c27474acSYu Kuai	depends on MD_BITMAP
84a34d4ef8SChristoph Hellwig	help
85a34d4ef8SChristoph Hellwig	  If you say Y here, support for write intent bitmaps in files on an
86a34d4ef8SChristoph Hellwig	  external file system is enabled.  This is an alternative to the internal
87a34d4ef8SChristoph Hellwig	  bitmaps near the MD superblock, and very problematic code that abuses
88a34d4ef8SChristoph Hellwig	  various kernel APIs and can only work with files on a file system not
89a34d4ef8SChristoph Hellwig	  actually sitting on the MD device.
90a34d4ef8SChristoph Hellwig
91127186cfSYu Kuaiconfig MD_LINEAR
92127186cfSYu Kuai	tristate "Linear (append) mode"
93127186cfSYu Kuai	depends on BLK_DEV_MD
94127186cfSYu Kuai	help
95127186cfSYu Kuai	  If you say Y here, then your multiple devices driver will be able to
96127186cfSYu Kuai	  use the so-called linear mode, i.e. it will combine the hard disk
97127186cfSYu Kuai	  partitions by simply appending one to the other.
98127186cfSYu Kuai
99127186cfSYu Kuai	  To compile this as a module, choose M here: the module
100127186cfSYu Kuai	  will be called linear.
101127186cfSYu Kuai
102127186cfSYu Kuai	  If unsure, say Y.
103127186cfSYu Kuai
1041da177e4SLinus Torvaldsconfig MD_RAID0
1051da177e4SLinus Torvalds	tristate "RAID-0 (striping) mode"
1061da177e4SLinus Torvalds	depends on BLK_DEV_MD
107a7f7f624SMasahiro Yamada	help
1081da177e4SLinus Torvalds	  If you say Y here, then your multiple devices driver will be able to
1091da177e4SLinus Torvalds	  use the so-called raid0 mode, i.e. it will combine the hard disk
1101da177e4SLinus Torvalds	  partitions into one logical device in such a fashion as to fill them
1111da177e4SLinus Torvalds	  up evenly, one chunk here and one chunk there. This will increase
1121da177e4SLinus Torvalds	  the throughput rate if the partitions reside on distinct disks.
1131da177e4SLinus Torvalds
1141da177e4SLinus Torvalds	  Information about Software RAID on Linux is contained in the
1151da177e4SLinus Torvalds	  Software-RAID mini-HOWTO, available from
1166f3bc22bSAlexander A. Klimov	  <https://www.tldp.org/docs.html#howto>. There you will also
1171da177e4SLinus Torvalds	  learn where to get the supporting user space utilities raidtools.
1181da177e4SLinus Torvalds
1191da177e4SLinus Torvalds	  To compile this as a module, choose M here: the module
1201da177e4SLinus Torvalds	  will be called raid0.
1211da177e4SLinus Torvalds
1221da177e4SLinus Torvalds	  If unsure, say Y.
1231da177e4SLinus Torvalds
1241da177e4SLinus Torvaldsconfig MD_RAID1
1251da177e4SLinus Torvalds	tristate "RAID-1 (mirroring) mode"
1261da177e4SLinus Torvalds	depends on BLK_DEV_MD
127a7f7f624SMasahiro Yamada	help
1281da177e4SLinus Torvalds	  A RAID-1 set consists of several disk drives which are exact copies
1291da177e4SLinus Torvalds	  of each other.  In the event of a mirror failure, the RAID driver
1301da177e4SLinus Torvalds	  will continue to use the operational mirrors in the set, providing
1311da177e4SLinus Torvalds	  an error free MD (multiple device) to the higher levels of the
1321da177e4SLinus Torvalds	  kernel.  In a set with N drives, the available space is the capacity
1331da177e4SLinus Torvalds	  of a single drive, and the set protects against a failure of (N - 1)
1341da177e4SLinus Torvalds	  drives.
1351da177e4SLinus Torvalds
1361da177e4SLinus Torvalds	  Information about Software RAID on Linux is contained in the
1371da177e4SLinus Torvalds	  Software-RAID mini-HOWTO, available from
1386f3bc22bSAlexander A. Klimov	  <https://www.tldp.org/docs.html#howto>.  There you will also
1391da177e4SLinus Torvalds	  learn where to get the supporting user space utilities raidtools.
1401da177e4SLinus Torvalds
1411da177e4SLinus Torvalds	  If you want to use such a RAID-1 set, say Y.  To compile this code
1421da177e4SLinus Torvalds	  as a module, choose M here: the module will be called raid1.
1431da177e4SLinus Torvalds
1441da177e4SLinus Torvalds	  If unsure, say Y.
1451da177e4SLinus Torvalds
1461da177e4SLinus Torvaldsconfig MD_RAID10
14708fb730cSNeilBrown	tristate "RAID-10 (mirrored striping) mode"
14808fb730cSNeilBrown	depends on BLK_DEV_MD
149a7f7f624SMasahiro Yamada	help
1501da177e4SLinus Torvalds	  RAID-10 provides a combination of striping (RAID-0) and
1514d2554d0SJustin Piszcz	  mirroring (RAID-1) with easier configuration and more flexible
1521da177e4SLinus Torvalds	  layout.
1531da177e4SLinus Torvalds	  Unlike RAID-0, but like RAID-1, RAID-10 requires all devices to
1541da177e4SLinus Torvalds	  be the same size (or at least, only as much as the smallest device
1551da177e4SLinus Torvalds	  will be used).
1561da177e4SLinus Torvalds	  RAID-10 provides a variety of layouts that provide different levels
1571da177e4SLinus Torvalds	  of redundancy and performance.
1581da177e4SLinus Torvalds
1591da177e4SLinus Torvalds	  RAID-10 requires mdadm-1.7.0 or later, available at:
1601da177e4SLinus Torvalds
1614f6cce39SSeongJae Park	  https://www.kernel.org/pub/linux/utils/raid/mdadm/
1621da177e4SLinus Torvalds
1631da177e4SLinus Torvalds	  If unsure, say Y.
1641da177e4SLinus Torvalds
16516a53eccSNeilBrownconfig MD_RAID456
16616a53eccSNeilBrown	tristate "RAID-4/RAID-5/RAID-6 mode"
1671da177e4SLinus Torvalds	depends on BLK_DEV_MD
168f5e70d0fSDavid Woodhouse	select RAID6_PQ
169b261d222SEric Biggers	select CRC32
1709bc89cd8SDan Williams	select ASYNC_MEMCPY
1719bc89cd8SDan Williams	select ASYNC_XOR
172ac6b53b6SDan Williams	select ASYNC_PQ
173ac6b53b6SDan Williams	select ASYNC_RAID6_RECOV
174a7f7f624SMasahiro Yamada	help
1751da177e4SLinus Torvalds	  A RAID-5 set of N drives with a capacity of C MB per drive provides
1761da177e4SLinus Torvalds	  the capacity of C * (N - 1) MB, and protects against a failure
1771da177e4SLinus Torvalds	  of a single drive. For a given sector (row) number, (N - 1) drives
1781da177e4SLinus Torvalds	  contain data sectors, and one drive contains the parity protection.
1791da177e4SLinus Torvalds	  For a RAID-4 set, the parity blocks are present on a single drive,
1801da177e4SLinus Torvalds	  while a RAID-5 set distributes the parity across the drives in one
1811da177e4SLinus Torvalds	  of the available parity distribution methods.
1821da177e4SLinus Torvalds
18316a53eccSNeilBrown	  A RAID-6 set of N drives with a capacity of C MB per drive
18416a53eccSNeilBrown	  provides the capacity of C * (N - 2) MB, and protects
18516a53eccSNeilBrown	  against a failure of any two drives. For a given sector
18616a53eccSNeilBrown	  (row) number, (N - 2) drives contain data sectors, and two
18716a53eccSNeilBrown	  drives contains two independent redundancy syndromes.  Like
18816a53eccSNeilBrown	  RAID-5, RAID-6 distributes the syndromes across the drives
18916a53eccSNeilBrown	  in one of the available parity distribution methods.
19016a53eccSNeilBrown
1911da177e4SLinus Torvalds	  Information about Software RAID on Linux is contained in the
1921da177e4SLinus Torvalds	  Software-RAID mini-HOWTO, available from
1936f3bc22bSAlexander A. Klimov	  <https://www.tldp.org/docs.html#howto>. There you will also
1941da177e4SLinus Torvalds	  learn where to get the supporting user space utilities raidtools.
1951da177e4SLinus Torvalds
19616a53eccSNeilBrown	  If you want to use such a RAID-4/RAID-5/RAID-6 set, say Y.  To
1971da177e4SLinus Torvalds	  compile this code as a module, choose M here: the module
19816a53eccSNeilBrown	  will be called raid456.
1991da177e4SLinus Torvalds
2001da177e4SLinus Torvalds	  If unsure, say Y.
2011da177e4SLinus Torvalds
2028e854e9cSGoldwyn Rodriguesconfig MD_CLUSTER
203f0e230adSGuoqing Jiang	tristate "Cluster Support for MD"
204c27474acSYu Kuai	select MD_BITMAP
2058e854e9cSGoldwyn Rodrigues	depends on BLK_DEV_MD
2068e854e9cSGoldwyn Rodrigues	depends on DLM
2078e854e9cSGoldwyn Rodrigues	default n
208a7f7f624SMasahiro Yamada	help
2098e854e9cSGoldwyn Rodrigues	Clustering support for MD devices. This enables locking and
2108e854e9cSGoldwyn Rodrigues	synchronization across multiple systems on the cluster, so all
2118e854e9cSGoldwyn Rodrigues	nodes in the cluster can access the MD devices simultaneously.
2128e854e9cSGoldwyn Rodrigues
2138e854e9cSGoldwyn Rodrigues	This brings the redundancy (and uptime) of RAID levels across the
214f0e230adSGuoqing Jiang	nodes of the cluster. Currently, it can work with raid1 and raid10
215f0e230adSGuoqing Jiang	(limited support).
2168e854e9cSGoldwyn Rodrigues
2178e854e9cSGoldwyn Rodrigues	If unsure, say N.
2188e854e9cSGoldwyn Rodrigues
219cafe5635SKent Overstreetsource "drivers/md/bcache/Kconfig"
220cafe5635SKent Overstreet
2212995fa78SMikulas Patockaconfig BLK_DEV_DM_BUILTIN
2226341e62bSChristoph Jaeger	bool
2232995fa78SMikulas Patocka
2241da177e4SLinus Torvaldsconfig BLK_DEV_DM
2251da177e4SLinus Torvalds	tristate "Device mapper support"
226c66fd019SChristoph Hellwig	select BLOCK_HOLDER_DEPRECATED if SYSFS
2272995fa78SMikulas Patocka	select BLK_DEV_DM_BUILTIN
228248c7933SChristoph Hellwig	select BLK_MQ_STACKING
2295282ac80SEric Biggers	select CRYPTO_LIB_SHA256 if IMA
230976431b0SDan Williams	depends on DAX || DAX=n
231a7f7f624SMasahiro Yamada	help
2321da177e4SLinus Torvalds	  Device-mapper is a low level volume manager.  It works by allowing
2331da177e4SLinus Torvalds	  people to specify mappings for ranges of logical sectors.  Various
2341da177e4SLinus Torvalds	  mapping types are available, in addition people may write their own
2351da177e4SLinus Torvalds	  modules containing custom mappings if they wish.
2361da177e4SLinus Torvalds
2371da177e4SLinus Torvalds	  Higher level volume managers such as LVM2 use this driver.
2381da177e4SLinus Torvalds
2391da177e4SLinus Torvalds	  To compile this as a module, choose M here: the module will be
2401da177e4SLinus Torvalds	  called dm-mod.
2411da177e4SLinus Torvalds
2421da177e4SLinus Torvalds	  If unsure, say N.
2431da177e4SLinus Torvalds
244cc109201SBryn Reevesconfig DM_DEBUG
2456341e62bSChristoph Jaeger	bool "Device mapper debugging support"
2460149e57fSAlasdair G Kergon	depends on BLK_DEV_DM
247a7f7f624SMasahiro Yamada	help
248cc109201SBryn Reeves	  Enable this for messages that may help debug device-mapper problems.
249cc109201SBryn Reeves
250cc109201SBryn Reeves	  If unsure, say N.
251cc109201SBryn Reeves
25295d402f0SMikulas Patockaconfig DM_BUFIO
25395d402f0SMikulas Patocka       tristate
254d57916a0SAlasdair G Kergon       depends on BLK_DEV_DM
255a7f7f624SMasahiro Yamada	help
25695d402f0SMikulas Patocka	 This interface allows you to do buffered I/O on a device and acts
25795d402f0SMikulas Patocka	 as a cache, holding recently-read blocks in memory and performing
25895d402f0SMikulas Patocka	 delayed writes.
25995d402f0SMikulas Patocka
2602e8ed711SJoe Thornberconfig DM_DEBUG_BLOCK_MANAGER_LOCKING
2612e8ed711SJoe Thornber       bool "Block manager locking"
2622e8ed711SJoe Thornber       depends on DM_BUFIO
263a7f7f624SMasahiro Yamada	help
2642e8ed711SJoe Thornber	 Block manager locking can catch various metadata corruption issues.
2652e8ed711SJoe Thornber
2662e8ed711SJoe Thornber	 If unsure, say N.
2672e8ed711SJoe Thornber
26886bad0c7SMikulas Patockaconfig DM_DEBUG_BLOCK_STACK_TRACING
26986bad0c7SMikulas Patocka       bool "Keep stack trace of persistent data block lock holders"
2702e8ed711SJoe Thornber       depends on STACKTRACE_SUPPORT && DM_DEBUG_BLOCK_MANAGER_LOCKING
27186bad0c7SMikulas Patocka       select STACKTRACE
272a7f7f624SMasahiro Yamada	help
27386bad0c7SMikulas Patocka	 Enable this for messages that may help debug problems with the
27486bad0c7SMikulas Patocka	 block manager locking used by thin provisioning and caching.
27586bad0c7SMikulas Patocka
27686bad0c7SMikulas Patocka	 If unsure, say N.
2773f068040SMike Snitzer
2784f81a417SMike Snitzerconfig DM_BIO_PRISON
2794f81a417SMike Snitzer       tristate
280d57916a0SAlasdair G Kergon       depends on BLK_DEV_DM
281a7f7f624SMasahiro Yamada	help
2824f81a417SMike Snitzer	 Some bio locking schemes used by other device-mapper targets
2834f81a417SMike Snitzer	 including thin provisioning.
2844f81a417SMike Snitzer
285991d9fa0SJoe Thornbersource "drivers/md/persistent-data/Kconfig"
286991d9fa0SJoe Thornber
28718a5bf27SScott Bauerconfig DM_UNSTRIPED
28818a5bf27SScott Bauer       tristate "Unstriped target"
28918a5bf27SScott Bauer       depends on BLK_DEV_DM
290a7f7f624SMasahiro Yamada	help
29118a5bf27SScott Bauer	  Unstripes I/O so it is issued solely on a single drive in a HW
29218a5bf27SScott Bauer	  RAID0 or dm-striped target.
29318a5bf27SScott Bauer
2941da177e4SLinus Torvaldsconfig DM_CRYPT
2951da177e4SLinus Torvalds	tristate "Crypt target support"
2960149e57fSAlasdair G Kergon	depends on BLK_DEV_DM
29727f5411aSDmitry Baryshkov	depends on (ENCRYPTED_KEYS || ENCRYPTED_KEYS=n)
298363880c4SAhmad Fatoum	depends on (TRUSTED_KEYS || TRUSTED_KEYS=n)
299f656fa40SEric Biggers	select CRC32
3001da177e4SLinus Torvalds	select CRYPTO
3013263263fSHerbert Xu	select CRYPTO_CBC
302a1a262b6SArd Biesheuvel	select CRYPTO_ESSIV
303*d1c3b6b8SEric Biggers	select CRYPTO_LIB_AES
304ba59e59bSEric Biggers	select CRYPTO_LIB_MD5 # needed by lmk IV mode
305a7f7f624SMasahiro Yamada	help
3061da177e4SLinus Torvalds	  This device-mapper target allows you to create a device that
3071da177e4SLinus Torvalds	  transparently encrypts the data on it. You'll need to activate
3081da177e4SLinus Torvalds	  the ciphers you're going to use in the cryptoapi configuration.
3091da177e4SLinus Torvalds
310cf352487SLoic Pefferkorn	  For further information on dm-crypt and userspace tools see:
3116ed443c0SBaruch Siach	  <https://gitlab.com/cryptsetup/cryptsetup/wikis/DMCrypt>
3121da177e4SLinus Torvalds
3131da177e4SLinus Torvalds	  To compile this code as a module, choose M here: the module will
3141da177e4SLinus Torvalds	  be called dm-crypt.
3151da177e4SLinus Torvalds
3161da177e4SLinus Torvalds	  If unsure, say N.
3171da177e4SLinus Torvalds
3181da177e4SLinus Torvaldsconfig DM_SNAPSHOT
3190149e57fSAlasdair G Kergon       tristate "Snapshot target"
3200149e57fSAlasdair G Kergon       depends on BLK_DEV_DM
32155494bf2SMikulas Patocka       select DM_BUFIO
322a7f7f624SMasahiro Yamada	help
3234d2554d0SJustin Piszcz	 Allow volume managers to take writable snapshots of a device.
3241da177e4SLinus Torvalds
325991d9fa0SJoe Thornberconfig DM_THIN_PROVISIONING
326d57916a0SAlasdair G Kergon       tristate "Thin provisioning target"
327d57916a0SAlasdair G Kergon       depends on BLK_DEV_DM
328991d9fa0SJoe Thornber       select DM_PERSISTENT_DATA
3294f81a417SMike Snitzer       select DM_BIO_PRISON
330a7f7f624SMasahiro Yamada	help
331991d9fa0SJoe Thornber	 Provides thin provisioning and snapshots that share a data store.
332991d9fa0SJoe Thornber
333c6b4fcbaSJoe Thornberconfig DM_CACHE
334c6b4fcbaSJoe Thornber       tristate "Cache target (EXPERIMENTAL)"
335c6b4fcbaSJoe Thornber       depends on BLK_DEV_DM
336c6b4fcbaSJoe Thornber       default n
337c6b4fcbaSJoe Thornber       select DM_PERSISTENT_DATA
338c6b4fcbaSJoe Thornber       select DM_BIO_PRISON
339a7f7f624SMasahiro Yamada	help
340c6b4fcbaSJoe Thornber	 dm-cache attempts to improve performance of a block device by
341c6b4fcbaSJoe Thornber	 moving frequently used data to a smaller, higher performance
342c6b4fcbaSJoe Thornber	 device.  Different 'policy' plugins can be used to change the
343c6b4fcbaSJoe Thornber	 algorithms used to select which blocks are promoted, demoted,
344c6b4fcbaSJoe Thornber	 cleaned etc.  It supports writeback and writethrough modes.
345c6b4fcbaSJoe Thornber
34666a63635SJoe Thornberconfig DM_CACHE_SMQ
34766a63635SJoe Thornber       tristate "Stochastic MQ Cache Policy (EXPERIMENTAL)"
34866a63635SJoe Thornber       depends on DM_CACHE
34966a63635SJoe Thornber       default y
350a7f7f624SMasahiro Yamada	help
35166a63635SJoe Thornber	 A cache policy that uses a multiqueue ordered by recent hits
35266a63635SJoe Thornber	 to select which blocks should be promoted and demoted.
35366a63635SJoe Thornber	 This is meant to be a general purpose policy.  It prioritises
35466a63635SJoe Thornber	 reads over writes.  This SMQ policy (vs MQ) offers the promise
35566a63635SJoe Thornber	 of less memory utilization, improved performance and increased
35666a63635SJoe Thornber	 adaptability in the face of changing workloads.
35766a63635SJoe Thornber
35848debafeSMikulas Patockaconfig DM_WRITECACHE
35948debafeSMikulas Patocka	tristate "Writecache target"
36048debafeSMikulas Patocka	depends on BLK_DEV_DM
361a7f7f624SMasahiro Yamada	help
36248debafeSMikulas Patocka	   The writecache target caches writes on persistent memory or SSD.
36348debafeSMikulas Patocka	   It is intended for databases or other programs that need extremely
36448debafeSMikulas Patocka	   low commit latency.
36548debafeSMikulas Patocka
36648debafeSMikulas Patocka	   The writecache target doesn't cache reads because reads are supposed
36748debafeSMikulas Patocka	   to be cached in standard RAM.
36848debafeSMikulas Patocka
369d3c7b35cSHeinz Mauelshagenconfig DM_EBS
370d3c7b35cSHeinz Mauelshagen	tristate "Emulated block size target (EXPERIMENTAL)"
3711c277e50SChristoph Hellwig	depends on BLK_DEV_DM && !HIGHMEM
372d3c7b35cSHeinz Mauelshagen	select DM_BUFIO
373d3c7b35cSHeinz Mauelshagen	help
374d3c7b35cSHeinz Mauelshagen	  dm-ebs emulates smaller logical block size on backing devices
375d3c7b35cSHeinz Mauelshagen	  with larger ones (e.g. 512 byte sectors on 4K native disks).
376d3c7b35cSHeinz Mauelshagen
377eec40579SJoe Thornberconfig DM_ERA
378eec40579SJoe Thornber       tristate "Era target (EXPERIMENTAL)"
379eec40579SJoe Thornber       depends on BLK_DEV_DM
380eec40579SJoe Thornber       default n
381eec40579SJoe Thornber       select DM_PERSISTENT_DATA
382eec40579SJoe Thornber       select DM_BIO_PRISON
383a7f7f624SMasahiro Yamada	help
384eec40579SJoe Thornber	 dm-era tracks which parts of a block device are written to
385eec40579SJoe Thornber	 over time.  Useful for maintaining cache coherency when using
386eec40579SJoe Thornber	 vendor snapshots.
387eec40579SJoe Thornber
3887431b783SNikos Tsironisconfig DM_CLONE
3897431b783SNikos Tsironis       tristate "Clone target (EXPERIMENTAL)"
3907431b783SNikos Tsironis       depends on BLK_DEV_DM
3917431b783SNikos Tsironis       default n
3927431b783SNikos Tsironis       select DM_PERSISTENT_DATA
393a7f7f624SMasahiro Yamada	help
3947431b783SNikos Tsironis	 dm-clone produces a one-to-one copy of an existing, read-only source
3957431b783SNikos Tsironis	 device into a writable destination device. The cloned device is
3967431b783SNikos Tsironis	 visible/mountable immediately and the copy of the source device to the
3977431b783SNikos Tsironis	 destination device happens in the background, in parallel with user
3987431b783SNikos Tsironis	 I/O.
3997431b783SNikos Tsironis
4007431b783SNikos Tsironis	 If unsure, say N.
4017431b783SNikos Tsironis
4021da177e4SLinus Torvaldsconfig DM_MIRROR
4030149e57fSAlasdair G Kergon       tristate "Mirror target"
4040149e57fSAlasdair G Kergon       depends on BLK_DEV_DM
405a7f7f624SMasahiro Yamada	help
4061da177e4SLinus Torvalds	 Allow volume managers to mirror logical volumes, also
4071da177e4SLinus Torvalds	 needed for live data migration tools such as 'pvmove'.
4081da177e4SLinus Torvalds
4095442851eSMikulas Patockaconfig DM_LOG_USERSPACE
4105442851eSMikulas Patocka	tristate "Mirror userspace logging"
4115442851eSMikulas Patocka	depends on DM_MIRROR && NET
4125442851eSMikulas Patocka	select CONNECTOR
413a7f7f624SMasahiro Yamada	help
4145442851eSMikulas Patocka	  The userspace logging module provides a mechanism for
4155442851eSMikulas Patocka	  relaying the dm-dirty-log API to userspace.  Log designs
4165442851eSMikulas Patocka	  which are more suited to userspace implementation (e.g.
4175442851eSMikulas Patocka	  shared storage logs) or experimental logs can be implemented
4185442851eSMikulas Patocka	  by leveraging this framework.
4195442851eSMikulas Patocka
4209d09e663SNeilBrownconfig DM_RAID
421d9f691c3SNeilBrown       tristate "RAID 1/4/5/6/10 target"
422035220b3SAlasdair G Kergon       depends on BLK_DEV_DM
4237b81ef8bSMikulas Patocka       select MD_RAID0
424b12d437bSJonathan Brassow       select MD_RAID1
425d9f691c3SNeilBrown       select MD_RAID10
4269d09e663SNeilBrown       select MD_RAID456
427c27474acSYu Kuai       select MD_BITMAP
4289d09e663SNeilBrown       select BLK_DEV_MD
429a7f7f624SMasahiro Yamada	help
430d9f691c3SNeilBrown	 A dm target that supports RAID1, RAID10, RAID4, RAID5 and RAID6 mappings
4319d09e663SNeilBrown
4329d09e663SNeilBrown	 A RAID-5 set of N drives with a capacity of C MB per drive provides
4339d09e663SNeilBrown	 the capacity of C * (N - 1) MB, and protects against a failure
4349d09e663SNeilBrown	 of a single drive. For a given sector (row) number, (N - 1) drives
4359d09e663SNeilBrown	 contain data sectors, and one drive contains the parity protection.
4369d09e663SNeilBrown	 For a RAID-4 set, the parity blocks are present on a single drive,
4379d09e663SNeilBrown	 while a RAID-5 set distributes the parity across the drives in one
4389d09e663SNeilBrown	 of the available parity distribution methods.
4399d09e663SNeilBrown
4409d09e663SNeilBrown	 A RAID-6 set of N drives with a capacity of C MB per drive
4419d09e663SNeilBrown	 provides the capacity of C * (N - 2) MB, and protects
4429d09e663SNeilBrown	 against a failure of any two drives. For a given sector
4439d09e663SNeilBrown	 (row) number, (N - 2) drives contain data sectors, and two
4449d09e663SNeilBrown	 drives contains two independent redundancy syndromes.  Like
4459d09e663SNeilBrown	 RAID-5, RAID-6 distributes the syndromes across the drives
4469d09e663SNeilBrown	 in one of the available parity distribution methods.
4479d09e663SNeilBrown
4481da177e4SLinus Torvaldsconfig DM_ZERO
4490149e57fSAlasdair G Kergon	tristate "Zero target"
4500149e57fSAlasdair G Kergon	depends on BLK_DEV_DM
451a7f7f624SMasahiro Yamada	help
4521da177e4SLinus Torvalds	  A target that discards writes, and returns all zeroes for
4531da177e4SLinus Torvalds	  reads.  Useful in some recovery situations.
4541da177e4SLinus Torvalds
4551da177e4SLinus Torvaldsconfig DM_MULTIPATH
4560149e57fSAlasdair G Kergon	tristate "Multipath target"
4570149e57fSAlasdair G Kergon	depends on BLK_DEV_DM
458fe9233fbSChandra Seetharaman	# nasty syntax but means make DM_MULTIPATH independent
459fe9233fbSChandra Seetharaman	# of SCSI_DH if the latter isn't defined but if
460fe9233fbSChandra Seetharaman	# it is, DM_MULTIPATH must depend on it.  We get a build
461fe9233fbSChandra Seetharaman	# error if SCSI_DH=m and DM_MULTIPATH=y
462294ab783SChristoph Hellwig	depends on !SCSI_DH || SCSI
463a7f7f624SMasahiro Yamada	help
4641da177e4SLinus Torvalds	  Allow volume managers to support multipath hardware.
4651da177e4SLinus Torvalds
466fd5e0339SKiyoshi Uedaconfig DM_MULTIPATH_QL
467fd5e0339SKiyoshi Ueda	tristate "I/O Path Selector based on the number of in-flight I/Os"
468fd5e0339SKiyoshi Ueda	depends on DM_MULTIPATH
469a7f7f624SMasahiro Yamada	help
470fd5e0339SKiyoshi Ueda	  This path selector is a dynamic load balancer which selects
471fd5e0339SKiyoshi Ueda	  the path with the least number of in-flight I/Os.
472fd5e0339SKiyoshi Ueda
473fd5e0339SKiyoshi Ueda	  If unsure, say N.
474fd5e0339SKiyoshi Ueda
475f392ba88SKiyoshi Uedaconfig DM_MULTIPATH_ST
476f392ba88SKiyoshi Ueda	tristate "I/O Path Selector based on the service time"
477f392ba88SKiyoshi Ueda	depends on DM_MULTIPATH
478a7f7f624SMasahiro Yamada	help
479f392ba88SKiyoshi Ueda	  This path selector is a dynamic load balancer which selects
480f392ba88SKiyoshi Ueda	  the path expected to complete the incoming I/O in the shortest
481f392ba88SKiyoshi Ueda	  time.
482f392ba88SKiyoshi Ueda
483f392ba88SKiyoshi Ueda	  If unsure, say N.
484f392ba88SKiyoshi Ueda
4852613eab1SKhazhismel Kumykovconfig DM_MULTIPATH_HST
4862613eab1SKhazhismel Kumykov	tristate "I/O Path Selector based on historical service time"
4872613eab1SKhazhismel Kumykov	depends on DM_MULTIPATH
4882613eab1SKhazhismel Kumykov	help
4892613eab1SKhazhismel Kumykov	  This path selector is a dynamic load balancer which selects
4902613eab1SKhazhismel Kumykov	  the path expected to complete the incoming I/O in the shortest
4912613eab1SKhazhismel Kumykov	  time by comparing estimated service time (based on historical
4922613eab1SKhazhismel Kumykov	  service time).
4932613eab1SKhazhismel Kumykov
4942613eab1SKhazhismel Kumykov	  If unsure, say N.
4952613eab1SKhazhismel Kumykov
496e4d2e82bSMike Christieconfig DM_MULTIPATH_IOA
497e4d2e82bSMike Christie	tristate "I/O Path Selector based on CPU submission"
498e4d2e82bSMike Christie	depends on DM_MULTIPATH
499e4d2e82bSMike Christie	help
500e4d2e82bSMike Christie	  This path selector selects the path based on the CPU the IO is
501e4d2e82bSMike Christie	  executed on and the CPU to path mapping setup at path addition time.
502e4d2e82bSMike Christie
503e4d2e82bSMike Christie	  If unsure, say N.
504e4d2e82bSMike Christie
50526b9f228SHeinz Mauelshagenconfig DM_DELAY
506d57916a0SAlasdair G Kergon	tristate "I/O delaying target"
507d57916a0SAlasdair G Kergon	depends on BLK_DEV_DM
508a7f7f624SMasahiro Yamada	help
50926b9f228SHeinz Mauelshagen	A target that delays reads and/or writes and can send
51026b9f228SHeinz Mauelshagen	them to different devices.  Useful for testing.
51126b9f228SHeinz Mauelshagen
51226b9f228SHeinz Mauelshagen	If unsure, say N.
51326b9f228SHeinz Mauelshagen
514e4f3fabdSBryan Gurneyconfig DM_DUST
515e4f3fabdSBryan Gurney	tristate "Bad sector simulation target"
516e4f3fabdSBryan Gurney	depends on BLK_DEV_DM
517a7f7f624SMasahiro Yamada	help
518e4f3fabdSBryan Gurney	A target that simulates bad sector behavior.
519e4f3fabdSBryan Gurney	Useful for testing.
520e4f3fabdSBryan Gurney
521e4f3fabdSBryan Gurney	If unsure, say N.
522e4f3fabdSBryan Gurney
5236bbc923dSHelen Koikeconfig DM_INIT
5246bbc923dSHelen Koike	bool "DM \"dm-mod.create=\" parameter support"
5256bbc923dSHelen Koike	depends on BLK_DEV_DM=y
526a7f7f624SMasahiro Yamada	help
5276bbc923dSHelen Koike	Enable "dm-mod.create=" parameter to create mapped devices at init time.
5286bbc923dSHelen Koike	This option is useful to allow mounting rootfs without requiring an
5296bbc923dSHelen Koike	initramfs.
5306cf2a73cSMauro Carvalho Chehab	See Documentation/admin-guide/device-mapper/dm-init.rst for dm-mod.create="..."
5316bbc923dSHelen Koike	format.
5326bbc923dSHelen Koike
5336bbc923dSHelen Koike	If unsure, say N.
5346bbc923dSHelen Koike
53551e5b2bdSMike Andersonconfig DM_UEVENT
536e0b215daSAlasdair G Kergon	bool "DM uevents"
537e0b215daSAlasdair G Kergon	depends on BLK_DEV_DM
538a7f7f624SMasahiro Yamada	help
53951e5b2bdSMike Anderson	Generate udev events for DM events.
54051e5b2bdSMike Anderson
5413407ef52SJosef Bacikconfig DM_FLAKEY
542d57916a0SAlasdair G Kergon       tristate "Flakey target"
543d57916a0SAlasdair G Kergon       depends on BLK_DEV_DM
544a7f7f624SMasahiro Yamada	help
5453407ef52SJosef Bacik	 A target that intermittently fails I/O for debugging purposes.
5463407ef52SJosef Bacik
547a4ffc152SMikulas Patockaconfig DM_VERITY
548d57916a0SAlasdair G Kergon	tristate "Verity target support"
549d57916a0SAlasdair G Kergon	depends on BLK_DEV_DM
550a4ffc152SMikulas Patocka	select CRYPTO
551a4ffc152SMikulas Patocka	select CRYPTO_HASH
552ba0f428cSEric Biggers	select CRYPTO_LIB_SHA256
553a4ffc152SMikulas Patocka	select DM_BUFIO
5548fbb8fe7SEric Biggers	select REED_SOLOMON if DM_VERITY_FEC
5558fbb8fe7SEric Biggers	select REED_SOLOMON_DEC8 if DM_VERITY_FEC
556a7f7f624SMasahiro Yamada	help
557a4ffc152SMikulas Patocka	  This device-mapper target creates a read-only device that
558a4ffc152SMikulas Patocka	  transparently validates the data on one underlying device against
559a4ffc152SMikulas Patocka	  a pre-generated tree of cryptographic checksums stored on a second
560a4ffc152SMikulas Patocka	  device.
561a4ffc152SMikulas Patocka
562a4ffc152SMikulas Patocka	  You'll need to activate the digests you're going to use in the
563a4ffc152SMikulas Patocka	  cryptoapi configuration.
564a4ffc152SMikulas Patocka
565a4ffc152SMikulas Patocka	  To compile this code as a module, choose M here: the module will
566a4ffc152SMikulas Patocka	  be called dm-verity.
567a4ffc152SMikulas Patocka
568a4ffc152SMikulas Patocka	  If unsure, say N.
569a4ffc152SMikulas Patocka
57088cd3e6cSJaskaran Khuranaconfig DM_VERITY_VERIFY_ROOTHASH_SIG
57188cd3e6cSJaskaran Khurana	bool "Verity data device root hash signature verification support"
57288cd3e6cSJaskaran Khurana	depends on DM_VERITY
57388cd3e6cSJaskaran Khurana	select SYSTEM_DATA_VERIFICATION
57488cd3e6cSJaskaran Khurana	help
57588cd3e6cSJaskaran Khurana	  Add ability for dm-verity device to be validated if the
57688cd3e6cSJaskaran Khurana	  pre-generated tree of cryptographic checksums passed has a pkcs#7
57788cd3e6cSJaskaran Khurana	  signature file that can validate the roothash of the tree.
5784da8f8c8SMickaël Salaün
5794da8f8c8SMickaël Salaün	  By default, rely on the builtin trusted keyring.
5804da8f8c8SMickaël Salaün
5814da8f8c8SMickaël Salaün	  If unsure, say N.
5824da8f8c8SMickaël Salaün
5834da8f8c8SMickaël Salaünconfig DM_VERITY_VERIFY_ROOTHASH_SIG_SECONDARY_KEYRING
5844da8f8c8SMickaël Salaün	bool "Verity data device root hash signature verification with secondary keyring"
5854da8f8c8SMickaël Salaün	depends on DM_VERITY_VERIFY_ROOTHASH_SIG
5864da8f8c8SMickaël Salaün	depends on SECONDARY_TRUSTED_KEYRING
5874da8f8c8SMickaël Salaün	help
5884da8f8c8SMickaël Salaün	  Rely on the secondary trusted keyring to verify dm-verity signatures.
58988cd3e6cSJaskaran Khurana
59088cd3e6cSJaskaran Khurana	  If unsure, say N.
59188cd3e6cSJaskaran Khurana
5926fce1f40SLuca Boccassiconfig DM_VERITY_VERIFY_ROOTHASH_SIG_PLATFORM_KEYRING
5936fce1f40SLuca Boccassi	bool "Verity data device root hash signature verification with platform keyring"
5946fce1f40SLuca Boccassi	default DM_VERITY_VERIFY_ROOTHASH_SIG_SECONDARY_KEYRING
5956fce1f40SLuca Boccassi	depends on DM_VERITY_VERIFY_ROOTHASH_SIG
5966fce1f40SLuca Boccassi	depends on INTEGRITY_PLATFORM_KEYRING
5976fce1f40SLuca Boccassi	help
5986fce1f40SLuca Boccassi	  Rely also on the platform keyring to verify dm-verity signatures.
5996fce1f40SLuca Boccassi
6006fce1f40SLuca Boccassi	  If unsure, say N.
6016fce1f40SLuca Boccassi
602a739ff3fSSami Tolvanenconfig DM_VERITY_FEC
603a739ff3fSSami Tolvanen	bool "Verity forward error correction support"
604a739ff3fSSami Tolvanen	depends on DM_VERITY
605a7f7f624SMasahiro Yamada	help
606a739ff3fSSami Tolvanen	  Add forward error correction support to dm-verity. This option
607a739ff3fSSami Tolvanen	  makes it possible to use pre-generated error correction data to
608a739ff3fSSami Tolvanen	  recover from corrupted blocks.
609a739ff3fSSami Tolvanen
610a739ff3fSSami Tolvanen	  If unsure, say N.
611a739ff3fSSami Tolvanen
6129d0eb0abSJim Ramsayconfig DM_SWITCH
6139d0eb0abSJim Ramsay	tristate "Switch target support (EXPERIMENTAL)"
6149d0eb0abSJim Ramsay	depends on BLK_DEV_DM
615a7f7f624SMasahiro Yamada	help
6169d0eb0abSJim Ramsay	  This device-mapper target creates a device that supports an arbitrary
6179d0eb0abSJim Ramsay	  mapping of fixed-size regions of I/O across a fixed set of paths.
6189d0eb0abSJim Ramsay	  The path used for any specific region can be switched dynamically
6199d0eb0abSJim Ramsay	  by sending the target a message.
6209d0eb0abSJim Ramsay
6219d0eb0abSJim Ramsay	  To compile this code as a module, choose M here: the module will
6229d0eb0abSJim Ramsay	  be called dm-switch.
6239d0eb0abSJim Ramsay
6249d0eb0abSJim Ramsay	  If unsure, say N.
6259d0eb0abSJim Ramsay
6260e9cebe7SJosef Bacikconfig DM_LOG_WRITES
6270e9cebe7SJosef Bacik	tristate "Log writes target support"
6280e9cebe7SJosef Bacik	depends on BLK_DEV_DM
629a7f7f624SMasahiro Yamada	help
6300e9cebe7SJosef Bacik	  This device-mapper target takes two devices, one device to use
6310e9cebe7SJosef Bacik	  normally, one to log all write operations done to the first device.
6320e9cebe7SJosef Bacik	  This is for use by file system developers wishing to verify that
63357d42487SGeert Uytterhoeven	  their fs is writing a consistent file system at all times by allowing
6340e9cebe7SJosef Bacik	  them to replay the log in a variety of ways and to check the
6350e9cebe7SJosef Bacik	  contents.
6360e9cebe7SJosef Bacik
6370e9cebe7SJosef Bacik	  To compile this code as a module, choose M here: the module will
6380e9cebe7SJosef Bacik	  be called dm-log-writes.
6390e9cebe7SJosef Bacik
6400e9cebe7SJosef Bacik	  If unsure, say N.
6410e9cebe7SJosef Bacik
6427eada909SMikulas Patockaconfig DM_INTEGRITY
6437ab84db6SMike Snitzer	tristate "Integrity target support"
6447eada909SMikulas Patocka	depends on BLK_DEV_DM
6457eada909SMikulas Patocka	select BLK_DEV_INTEGRITY
6467eada909SMikulas Patocka	select DM_BUFIO
6477eada909SMikulas Patocka	select CRYPTO
648f7b347acSAnthony Iliopoulos	select CRYPTO_SKCIPHER
6497eada909SMikulas Patocka	select ASYNC_XOR
65082bb8599SMichael Weiß	select DM_AUDIT if AUDIT
651a7f7f624SMasahiro Yamada	help
6527ab84db6SMike Snitzer	  This device-mapper target emulates a block device that has
6537ab84db6SMike Snitzer	  additional per-sector tags that can be used for storing
6547ab84db6SMike Snitzer	  integrity information.
6557ab84db6SMike Snitzer
6567ab84db6SMike Snitzer	  This integrity target is used with the dm-crypt target to
6577ab84db6SMike Snitzer	  provide authenticated disk encryption or it can be used
6587ab84db6SMike Snitzer	  standalone.
6597ab84db6SMike Snitzer
6607ab84db6SMike Snitzer	  To compile this code as a module, choose M here: the module will
6617ab84db6SMike Snitzer	  be called dm-integrity.
6627ab84db6SMike Snitzer
6633b1a94c8SDamien Le Moalconfig DM_ZONED
6643b1a94c8SDamien Le Moal	tristate "Drive-managed zoned block device target support"
6653b1a94c8SDamien Le Moal	depends on BLK_DEV_DM
6663b1a94c8SDamien Le Moal	depends on BLK_DEV_ZONED
667b690bd54SArnd Bergmann	select CRC32
668a7f7f624SMasahiro Yamada	help
6693b1a94c8SDamien Le Moal	  This device-mapper target takes a host-managed or host-aware zoned
6703b1a94c8SDamien Le Moal	  block device and exposes most of its capacity as a regular block
6713b1a94c8SDamien Le Moal	  device (drive-managed zoned block device) without any write
6723b1a94c8SDamien Le Moal	  constraints. This is mainly intended for use with file systems that
6733b1a94c8SDamien Le Moal	  do not natively support zoned block devices but still want to
6743b1a94c8SDamien Le Moal	  benefit from the increased capacity offered by SMR disks. Other uses
6753b1a94c8SDamien Le Moal	  by applications using raw block devices (for example object stores)
6763b1a94c8SDamien Le Moal	  are also possible.
6773b1a94c8SDamien Le Moal
6783b1a94c8SDamien Le Moal	  To compile this code as a module, choose M here: the module will
6793b1a94c8SDamien Le Moal	  be called dm-zoned.
6803b1a94c8SDamien Le Moal
6817ab84db6SMike Snitzer	  If unsure, say N.
6827eada909SMikulas Patocka
6832cc1ae48SMichael Weißconfig DM_AUDIT
6842cc1ae48SMichael Weiß	bool "DM audit events"
6856849302fSMike Snitzer	depends on BLK_DEV_DM
6862cc1ae48SMichael Weiß	depends on AUDIT
6872cc1ae48SMichael Weiß	help
6882cc1ae48SMichael Weiß	  Generate audit events for device-mapper.
6892cc1ae48SMichael Weiß
6902cc1ae48SMichael Weiß	  Enables audit logging of several security relevant events in the
6912cc1ae48SMichael Weiß	  particular device-mapper targets, especially the integrity target.
6922cc1ae48SMichael Weiß
693f36b1d3bSMike Snitzersource "drivers/md/dm-vdo/Kconfig"
694f36b1d3bSMike Snitzer
6951d57628fSDongsheng Yangsource "drivers/md/dm-pcache/Kconfig"
6961d57628fSDongsheng Yang
697afd44034SJan Engelhardtendif # MD
698