0001 # SPDX-License-Identifier: GPL-2.0-only
0002 #
0003 # Block device driver configuration
0004 #
0005
0006 menuconfig MD
0007 bool "Multiple devices driver support (RAID and LVM)"
0008 depends on BLOCK
0009 select SRCU
0010 help
0011 Support multiple physical spindles through a single logical device.
0012 Required for RAID and logical volume management.
0013
0014 if MD
0015
0016 config BLK_DEV_MD
0017 tristate "RAID support"
0018 select BLOCK_HOLDER_DEPRECATED if SYSFS
0019 help
0020 This driver lets you combine several hard disk partitions into one
0021 logical block device. This can be used to simply append one
0022 partition to another one or to combine several redundant hard disks
0023 into a RAID1/4/5 device so as to provide protection against hard
0024 disk failures. This is called "Software RAID" since the combining of
0025 the partitions is done by the kernel. "Hardware RAID" means that the
0026 combining is done by a dedicated controller; if you have such a
0027 controller, you do not need to say Y here.
0028
0029 More information about Software RAID on Linux is contained in the
0030 Software RAID mini-HOWTO, available from
0031 <https://www.tldp.org/docs.html#howto>. There you will also learn
0032 where to get the supporting user space utilities raidtools.
0033
0034 If unsure, say N.
0035
0036 config MD_AUTODETECT
0037 bool "Autodetect RAID arrays during kernel boot"
0038 depends on BLK_DEV_MD=y
0039 default y
0040 help
0041 If you say Y here, then the kernel will try to autodetect raid
0042 arrays as part of its boot process.
0043
0044 If you don't use raid and say Y, this autodetection can cause
0045 a several-second delay in the boot time due to various
0046 synchronisation steps that are part of this step.
0047
0048 If unsure, say Y.
0049
0050 config MD_LINEAR
0051 tristate "Linear (append) mode (deprecated)"
0052 depends on BLK_DEV_MD
0053 help
0054 If you say Y here, then your multiple devices driver will be able to
0055 use the so-called linear mode, i.e. it will combine the hard disk
0056 partitions by simply appending one to the other.
0057
0058 To compile this as a module, choose M here: the module
0059 will be called linear.
0060
0061 If unsure, say Y.
0062
0063 config MD_RAID0
0064 tristate "RAID-0 (striping) mode"
0065 depends on BLK_DEV_MD
0066 help
0067 If you say Y here, then your multiple devices driver will be able to
0068 use the so-called raid0 mode, i.e. it will combine the hard disk
0069 partitions into one logical device in such a fashion as to fill them
0070 up evenly, one chunk here and one chunk there. This will increase
0071 the throughput rate if the partitions reside on distinct disks.
0072
0073 Information about Software RAID on Linux is contained in the
0074 Software-RAID mini-HOWTO, available from
0075 <https://www.tldp.org/docs.html#howto>. There you will also
0076 learn where to get the supporting user space utilities raidtools.
0077
0078 To compile this as a module, choose M here: the module
0079 will be called raid0.
0080
0081 If unsure, say Y.
0082
0083 config MD_RAID1
0084 tristate "RAID-1 (mirroring) mode"
0085 depends on BLK_DEV_MD
0086 help
0087 A RAID-1 set consists of several disk drives which are exact copies
0088 of each other. In the event of a mirror failure, the RAID driver
0089 will continue to use the operational mirrors in the set, providing
0090 an error free MD (multiple device) to the higher levels of the
0091 kernel. In a set with N drives, the available space is the capacity
0092 of a single drive, and the set protects against a failure of (N - 1)
0093 drives.
0094
0095 Information about Software RAID on Linux is contained in the
0096 Software-RAID mini-HOWTO, available from
0097 <https://www.tldp.org/docs.html#howto>. There you will also
0098 learn where to get the supporting user space utilities raidtools.
0099
0100 If you want to use such a RAID-1 set, say Y. To compile this code
0101 as a module, choose M here: the module will be called raid1.
0102
0103 If unsure, say Y.
0104
0105 config MD_RAID10
0106 tristate "RAID-10 (mirrored striping) mode"
0107 depends on BLK_DEV_MD
0108 help
0109 RAID-10 provides a combination of striping (RAID-0) and
0110 mirroring (RAID-1) with easier configuration and more flexible
0111 layout.
0112 Unlike RAID-0, but like RAID-1, RAID-10 requires all devices to
0113 be the same size (or at least, only as much as the smallest device
0114 will be used).
0115 RAID-10 provides a variety of layouts that provide different levels
0116 of redundancy and performance.
0117
0118 RAID-10 requires mdadm-1.7.0 or later, available at:
0119
0120 https://www.kernel.org/pub/linux/utils/raid/mdadm/
0121
0122 If unsure, say Y.
0123
0124 config MD_RAID456
0125 tristate "RAID-4/RAID-5/RAID-6 mode"
0126 depends on BLK_DEV_MD
0127 select RAID6_PQ
0128 select LIBCRC32C
0129 select ASYNC_MEMCPY
0130 select ASYNC_XOR
0131 select ASYNC_PQ
0132 select ASYNC_RAID6_RECOV
0133 help
0134 A RAID-5 set of N drives with a capacity of C MB per drive provides
0135 the capacity of C * (N - 1) MB, and protects against a failure
0136 of a single drive. For a given sector (row) number, (N - 1) drives
0137 contain data sectors, and one drive contains the parity protection.
0138 For a RAID-4 set, the parity blocks are present on a single drive,
0139 while a RAID-5 set distributes the parity across the drives in one
0140 of the available parity distribution methods.
0141
0142 A RAID-6 set of N drives with a capacity of C MB per drive
0143 provides the capacity of C * (N - 2) MB, and protects
0144 against a failure of any two drives. For a given sector
0145 (row) number, (N - 2) drives contain data sectors, and two
0146 drives contains two independent redundancy syndromes. Like
0147 RAID-5, RAID-6 distributes the syndromes across the drives
0148 in one of the available parity distribution methods.
0149
0150 Information about Software RAID on Linux is contained in the
0151 Software-RAID mini-HOWTO, available from
0152 <https://www.tldp.org/docs.html#howto>. There you will also
0153 learn where to get the supporting user space utilities raidtools.
0154
0155 If you want to use such a RAID-4/RAID-5/RAID-6 set, say Y. To
0156 compile this code as a module, choose M here: the module
0157 will be called raid456.
0158
0159 If unsure, say Y.
0160
0161 config MD_MULTIPATH
0162 tristate "Multipath I/O support (deprecated)"
0163 depends on BLK_DEV_MD
0164 help
0165 MD_MULTIPATH provides a simple multi-path personality for use
0166 the MD framework. It is not under active development. New
0167 projects should consider using DM_MULTIPATH which has more
0168 features and more testing.
0169
0170 If unsure, say N.
0171
0172 config MD_FAULTY
0173 tristate "Faulty test module for MD (deprecated)"
0174 depends on BLK_DEV_MD
0175 help
0176 The "faulty" module allows for a block device that occasionally returns
0177 read or write errors. It is useful for testing.
0178
0179 In unsure, say N.
0180
0181
0182 config MD_CLUSTER
0183 tristate "Cluster Support for MD"
0184 depends on BLK_DEV_MD
0185 depends on DLM
0186 default n
0187 help
0188 Clustering support for MD devices. This enables locking and
0189 synchronization across multiple systems on the cluster, so all
0190 nodes in the cluster can access the MD devices simultaneously.
0191
0192 This brings the redundancy (and uptime) of RAID levels across the
0193 nodes of the cluster. Currently, it can work with raid1 and raid10
0194 (limited support).
0195
0196 If unsure, say N.
0197
0198 source "drivers/md/bcache/Kconfig"
0199
0200 config BLK_DEV_DM_BUILTIN
0201 bool
0202
0203 config BLK_DEV_DM
0204 tristate "Device mapper support"
0205 select BLOCK_HOLDER_DEPRECATED if SYSFS
0206 select BLK_DEV_DM_BUILTIN
0207 select BLK_MQ_STACKING
0208 depends on DAX || DAX=n
0209 help
0210 Device-mapper is a low level volume manager. It works by allowing
0211 people to specify mappings for ranges of logical sectors. Various
0212 mapping types are available, in addition people may write their own
0213 modules containing custom mappings if they wish.
0214
0215 Higher level volume managers such as LVM2 use this driver.
0216
0217 To compile this as a module, choose M here: the module will be
0218 called dm-mod.
0219
0220 If unsure, say N.
0221
0222 config DM_DEBUG
0223 bool "Device mapper debugging support"
0224 depends on BLK_DEV_DM
0225 help
0226 Enable this for messages that may help debug device-mapper problems.
0227
0228 If unsure, say N.
0229
0230 config DM_BUFIO
0231 tristate
0232 depends on BLK_DEV_DM
0233 help
0234 This interface allows you to do buffered I/O on a device and acts
0235 as a cache, holding recently-read blocks in memory and performing
0236 delayed writes.
0237
0238 config DM_DEBUG_BLOCK_MANAGER_LOCKING
0239 bool "Block manager locking"
0240 depends on DM_BUFIO
0241 help
0242 Block manager locking can catch various metadata corruption issues.
0243
0244 If unsure, say N.
0245
0246 config DM_DEBUG_BLOCK_STACK_TRACING
0247 bool "Keep stack trace of persistent data block lock holders"
0248 depends on STACKTRACE_SUPPORT && DM_DEBUG_BLOCK_MANAGER_LOCKING
0249 select STACKTRACE
0250 help
0251 Enable this for messages that may help debug problems with the
0252 block manager locking used by thin provisioning and caching.
0253
0254 If unsure, say N.
0255
0256 config DM_BIO_PRISON
0257 tristate
0258 depends on BLK_DEV_DM
0259 help
0260 Some bio locking schemes used by other device-mapper targets
0261 including thin provisioning.
0262
0263 source "drivers/md/persistent-data/Kconfig"
0264
0265 config DM_UNSTRIPED
0266 tristate "Unstriped target"
0267 depends on BLK_DEV_DM
0268 help
0269 Unstripes I/O so it is issued solely on a single drive in a HW
0270 RAID0 or dm-striped target.
0271
0272 config DM_CRYPT
0273 tristate "Crypt target support"
0274 depends on BLK_DEV_DM
0275 depends on (ENCRYPTED_KEYS || ENCRYPTED_KEYS=n)
0276 depends on (TRUSTED_KEYS || TRUSTED_KEYS=n)
0277 select CRYPTO
0278 select CRYPTO_CBC
0279 select CRYPTO_ESSIV
0280 help
0281 This device-mapper target allows you to create a device that
0282 transparently encrypts the data on it. You'll need to activate
0283 the ciphers you're going to use in the cryptoapi configuration.
0284
0285 For further information on dm-crypt and userspace tools see:
0286 <https://gitlab.com/cryptsetup/cryptsetup/wikis/DMCrypt>
0287
0288 To compile this code as a module, choose M here: the module will
0289 be called dm-crypt.
0290
0291 If unsure, say N.
0292
0293 config DM_SNAPSHOT
0294 tristate "Snapshot target"
0295 depends on BLK_DEV_DM
0296 select DM_BUFIO
0297 help
0298 Allow volume managers to take writable snapshots of a device.
0299
0300 config DM_THIN_PROVISIONING
0301 tristate "Thin provisioning target"
0302 depends on BLK_DEV_DM
0303 select DM_PERSISTENT_DATA
0304 select DM_BIO_PRISON
0305 help
0306 Provides thin provisioning and snapshots that share a data store.
0307
0308 config DM_CACHE
0309 tristate "Cache target (EXPERIMENTAL)"
0310 depends on BLK_DEV_DM
0311 default n
0312 select DM_PERSISTENT_DATA
0313 select DM_BIO_PRISON
0314 help
0315 dm-cache attempts to improve performance of a block device by
0316 moving frequently used data to a smaller, higher performance
0317 device. Different 'policy' plugins can be used to change the
0318 algorithms used to select which blocks are promoted, demoted,
0319 cleaned etc. It supports writeback and writethrough modes.
0320
0321 config DM_CACHE_SMQ
0322 tristate "Stochastic MQ Cache Policy (EXPERIMENTAL)"
0323 depends on DM_CACHE
0324 default y
0325 help
0326 A cache policy that uses a multiqueue ordered by recent hits
0327 to select which blocks should be promoted and demoted.
0328 This is meant to be a general purpose policy. It prioritises
0329 reads over writes. This SMQ policy (vs MQ) offers the promise
0330 of less memory utilization, improved performance and increased
0331 adaptability in the face of changing workloads.
0332
0333 config DM_WRITECACHE
0334 tristate "Writecache target"
0335 depends on BLK_DEV_DM
0336 help
0337 The writecache target caches writes on persistent memory or SSD.
0338 It is intended for databases or other programs that need extremely
0339 low commit latency.
0340
0341 The writecache target doesn't cache reads because reads are supposed
0342 to be cached in standard RAM.
0343
0344 config DM_EBS
0345 tristate "Emulated block size target (EXPERIMENTAL)"
0346 depends on BLK_DEV_DM && !HIGHMEM
0347 select DM_BUFIO
0348 help
0349 dm-ebs emulates smaller logical block size on backing devices
0350 with larger ones (e.g. 512 byte sectors on 4K native disks).
0351
0352 config DM_ERA
0353 tristate "Era target (EXPERIMENTAL)"
0354 depends on BLK_DEV_DM
0355 default n
0356 select DM_PERSISTENT_DATA
0357 select DM_BIO_PRISON
0358 help
0359 dm-era tracks which parts of a block device are written to
0360 over time. Useful for maintaining cache coherency when using
0361 vendor snapshots.
0362
0363 config DM_CLONE
0364 tristate "Clone target (EXPERIMENTAL)"
0365 depends on BLK_DEV_DM
0366 default n
0367 select DM_PERSISTENT_DATA
0368 help
0369 dm-clone produces a one-to-one copy of an existing, read-only source
0370 device into a writable destination device. The cloned device is
0371 visible/mountable immediately and the copy of the source device to the
0372 destination device happens in the background, in parallel with user
0373 I/O.
0374
0375 If unsure, say N.
0376
0377 config DM_MIRROR
0378 tristate "Mirror target"
0379 depends on BLK_DEV_DM
0380 help
0381 Allow volume managers to mirror logical volumes, also
0382 needed for live data migration tools such as 'pvmove'.
0383
0384 config DM_LOG_USERSPACE
0385 tristate "Mirror userspace logging"
0386 depends on DM_MIRROR && NET
0387 select CONNECTOR
0388 help
0389 The userspace logging module provides a mechanism for
0390 relaying the dm-dirty-log API to userspace. Log designs
0391 which are more suited to userspace implementation (e.g.
0392 shared storage logs) or experimental logs can be implemented
0393 by leveraging this framework.
0394
0395 config DM_RAID
0396 tristate "RAID 1/4/5/6/10 target"
0397 depends on BLK_DEV_DM
0398 select MD_RAID0
0399 select MD_RAID1
0400 select MD_RAID10
0401 select MD_RAID456
0402 select BLK_DEV_MD
0403 help
0404 A dm target that supports RAID1, RAID10, RAID4, RAID5 and RAID6 mappings
0405
0406 A RAID-5 set of N drives with a capacity of C MB per drive provides
0407 the capacity of C * (N - 1) MB, and protects against a failure
0408 of a single drive. For a given sector (row) number, (N - 1) drives
0409 contain data sectors, and one drive contains the parity protection.
0410 For a RAID-4 set, the parity blocks are present on a single drive,
0411 while a RAID-5 set distributes the parity across the drives in one
0412 of the available parity distribution methods.
0413
0414 A RAID-6 set of N drives with a capacity of C MB per drive
0415 provides the capacity of C * (N - 2) MB, and protects
0416 against a failure of any two drives. For a given sector
0417 (row) number, (N - 2) drives contain data sectors, and two
0418 drives contains two independent redundancy syndromes. Like
0419 RAID-5, RAID-6 distributes the syndromes across the drives
0420 in one of the available parity distribution methods.
0421
0422 config DM_ZERO
0423 tristate "Zero target"
0424 depends on BLK_DEV_DM
0425 help
0426 A target that discards writes, and returns all zeroes for
0427 reads. Useful in some recovery situations.
0428
0429 config DM_MULTIPATH
0430 tristate "Multipath target"
0431 depends on BLK_DEV_DM
0432 # nasty syntax but means make DM_MULTIPATH independent
0433 # of SCSI_DH if the latter isn't defined but if
0434 # it is, DM_MULTIPATH must depend on it. We get a build
0435 # error if SCSI_DH=m and DM_MULTIPATH=y
0436 depends on !SCSI_DH || SCSI
0437 help
0438 Allow volume managers to support multipath hardware.
0439
0440 config DM_MULTIPATH_QL
0441 tristate "I/O Path Selector based on the number of in-flight I/Os"
0442 depends on DM_MULTIPATH
0443 help
0444 This path selector is a dynamic load balancer which selects
0445 the path with the least number of in-flight I/Os.
0446
0447 If unsure, say N.
0448
0449 config DM_MULTIPATH_ST
0450 tristate "I/O Path Selector based on the service time"
0451 depends on DM_MULTIPATH
0452 help
0453 This path selector is a dynamic load balancer which selects
0454 the path expected to complete the incoming I/O in the shortest
0455 time.
0456
0457 If unsure, say N.
0458
0459 config DM_MULTIPATH_HST
0460 tristate "I/O Path Selector based on historical service time"
0461 depends on DM_MULTIPATH
0462 help
0463 This path selector is a dynamic load balancer which selects
0464 the path expected to complete the incoming I/O in the shortest
0465 time by comparing estimated service time (based on historical
0466 service time).
0467
0468 If unsure, say N.
0469
0470 config DM_MULTIPATH_IOA
0471 tristate "I/O Path Selector based on CPU submission"
0472 depends on DM_MULTIPATH
0473 help
0474 This path selector selects the path based on the CPU the IO is
0475 executed on and the CPU to path mapping setup at path addition time.
0476
0477 If unsure, say N.
0478
0479 config DM_DELAY
0480 tristate "I/O delaying target"
0481 depends on BLK_DEV_DM
0482 help
0483 A target that delays reads and/or writes and can send
0484 them to different devices. Useful for testing.
0485
0486 If unsure, say N.
0487
0488 config DM_DUST
0489 tristate "Bad sector simulation target"
0490 depends on BLK_DEV_DM
0491 help
0492 A target that simulates bad sector behavior.
0493 Useful for testing.
0494
0495 If unsure, say N.
0496
0497 config DM_INIT
0498 bool "DM \"dm-mod.create=\" parameter support"
0499 depends on BLK_DEV_DM=y
0500 help
0501 Enable "dm-mod.create=" parameter to create mapped devices at init time.
0502 This option is useful to allow mounting rootfs without requiring an
0503 initramfs.
0504 See Documentation/admin-guide/device-mapper/dm-init.rst for dm-mod.create="..."
0505 format.
0506
0507 If unsure, say N.
0508
0509 config DM_UEVENT
0510 bool "DM uevents"
0511 depends on BLK_DEV_DM
0512 help
0513 Generate udev events for DM events.
0514
0515 config DM_FLAKEY
0516 tristate "Flakey target"
0517 depends on BLK_DEV_DM
0518 help
0519 A target that intermittently fails I/O for debugging purposes.
0520
0521 config DM_VERITY
0522 tristate "Verity target support"
0523 depends on BLK_DEV_DM
0524 select CRYPTO
0525 select CRYPTO_HASH
0526 select DM_BUFIO
0527 help
0528 This device-mapper target creates a read-only device that
0529 transparently validates the data on one underlying device against
0530 a pre-generated tree of cryptographic checksums stored on a second
0531 device.
0532
0533 You'll need to activate the digests you're going to use in the
0534 cryptoapi configuration.
0535
0536 To compile this code as a module, choose M here: the module will
0537 be called dm-verity.
0538
0539 If unsure, say N.
0540
0541 config DM_VERITY_VERIFY_ROOTHASH_SIG
0542 def_bool n
0543 bool "Verity data device root hash signature verification support"
0544 depends on DM_VERITY
0545 select SYSTEM_DATA_VERIFICATION
0546 help
0547 Add ability for dm-verity device to be validated if the
0548 pre-generated tree of cryptographic checksums passed has a pkcs#7
0549 signature file that can validate the roothash of the tree.
0550
0551 By default, rely on the builtin trusted keyring.
0552
0553 If unsure, say N.
0554
0555 config DM_VERITY_VERIFY_ROOTHASH_SIG_SECONDARY_KEYRING
0556 bool "Verity data device root hash signature verification with secondary keyring"
0557 depends on DM_VERITY_VERIFY_ROOTHASH_SIG
0558 depends on SECONDARY_TRUSTED_KEYRING
0559 help
0560 Rely on the secondary trusted keyring to verify dm-verity signatures.
0561
0562 If unsure, say N.
0563
0564 config DM_VERITY_FEC
0565 bool "Verity forward error correction support"
0566 depends on DM_VERITY
0567 select REED_SOLOMON
0568 select REED_SOLOMON_DEC8
0569 help
0570 Add forward error correction support to dm-verity. This option
0571 makes it possible to use pre-generated error correction data to
0572 recover from corrupted blocks.
0573
0574 If unsure, say N.
0575
0576 config DM_SWITCH
0577 tristate "Switch target support (EXPERIMENTAL)"
0578 depends on BLK_DEV_DM
0579 help
0580 This device-mapper target creates a device that supports an arbitrary
0581 mapping of fixed-size regions of I/O across a fixed set of paths.
0582 The path used for any specific region can be switched dynamically
0583 by sending the target a message.
0584
0585 To compile this code as a module, choose M here: the module will
0586 be called dm-switch.
0587
0588 If unsure, say N.
0589
0590 config DM_LOG_WRITES
0591 tristate "Log writes target support"
0592 depends on BLK_DEV_DM
0593 help
0594 This device-mapper target takes two devices, one device to use
0595 normally, one to log all write operations done to the first device.
0596 This is for use by file system developers wishing to verify that
0597 their fs is writing a consistent file system at all times by allowing
0598 them to replay the log in a variety of ways and to check the
0599 contents.
0600
0601 To compile this code as a module, choose M here: the module will
0602 be called dm-log-writes.
0603
0604 If unsure, say N.
0605
0606 config DM_INTEGRITY
0607 tristate "Integrity target support"
0608 depends on BLK_DEV_DM
0609 select BLK_DEV_INTEGRITY
0610 select DM_BUFIO
0611 select CRYPTO
0612 select CRYPTO_SKCIPHER
0613 select ASYNC_XOR
0614 select DM_AUDIT if AUDIT
0615 help
0616 This device-mapper target emulates a block device that has
0617 additional per-sector tags that can be used for storing
0618 integrity information.
0619
0620 This integrity target is used with the dm-crypt target to
0621 provide authenticated disk encryption or it can be used
0622 standalone.
0623
0624 To compile this code as a module, choose M here: the module will
0625 be called dm-integrity.
0626
0627 config DM_ZONED
0628 tristate "Drive-managed zoned block device target support"
0629 depends on BLK_DEV_DM
0630 depends on BLK_DEV_ZONED
0631 select CRC32
0632 help
0633 This device-mapper target takes a host-managed or host-aware zoned
0634 block device and exposes most of its capacity as a regular block
0635 device (drive-managed zoned block device) without any write
0636 constraints. This is mainly intended for use with file systems that
0637 do not natively support zoned block devices but still want to
0638 benefit from the increased capacity offered by SMR disks. Other uses
0639 by applications using raw block devices (for example object stores)
0640 are also possible.
0641
0642 To compile this code as a module, choose M here: the module will
0643 be called dm-zoned.
0644
0645 If unsure, say N.
0646
0647 config DM_AUDIT
0648 bool "DM audit events"
0649 depends on AUDIT
0650 help
0651 Generate audit events for device-mapper.
0652
0653 Enables audit logging of several security relevant events in the
0654 particular device-mapper targets, especially the integrity target.
0655
0656 endif # MD