1# SPDX-License-Identifier: GPL-2.0-only 2# 3# Block device driver configuration 4# 5 6menuconfig MD 7 bool "Multiple devices driver support (RAID and LVM)" 8 depends on BLOCK 9 help 10 Support multiple physical spindles through a single logical device. 11 Required for RAID and logical volume management. 12 13if MD 14 15config BLK_DEV_MD 16 tristate "RAID support" 17 select BLOCK_HOLDER_DEPRECATED if SYSFS 18 select BUFFER_HEAD 19 # BLOCK_LEGACY_AUTOLOAD requirement should be removed 20 # after relevant mdadm enhancements - to make "names=yes" 21 # the default - are widely available. 22 select BLOCK_LEGACY_AUTOLOAD 23 help 24 This driver lets you combine several hard disk partitions into one 25 logical block device. This can be used to simply append one 26 partition to another one or to combine several redundant hard disks 27 into a RAID1/4/5 device so as to provide protection against hard 28 disk failures. This is called "Software RAID" since the combining of 29 the partitions is done by the kernel. "Hardware RAID" means that the 30 combining is done by a dedicated controller; if you have such a 31 controller, you do not need to say Y here. 32 33 More information about Software RAID on Linux is contained in the 34 Software RAID mini-HOWTO, available from 35 <https://www.tldp.org/docs.html#howto>. There you will also learn 36 where to get the supporting user space utilities raidtools. 37 38 If unsure, say N. 39 40config MD_BITMAP 41 bool "MD RAID bitmap support" 42 default y 43 depends on BLK_DEV_MD 44 help 45 If you say Y here, support for the write intent bitmap will be 46 enabled. The bitmap can be used to optimize resync speed after power 47 failure or readding a disk, limiting it to recorded dirty sectors in 48 bitmap. 49 50 This feature can be added to existing MD array or MD array can be 51 created with bitmap via mdadm(8). 52 53 If unsure, say Y. 54 55config MD_LLBITMAP 56 bool "MD RAID lockless bitmap support" 57 depends on BLK_DEV_MD 58 help 59 If you say Y here, support for the lockless write intent bitmap will 60 be enabled. 61 62 Note, this is an experimental feature. 63 64 If unsure, say N. 65 66config MD_AUTODETECT 67 bool "Autodetect RAID arrays during kernel boot" 68 depends on BLK_DEV_MD=y 69 default y 70 help 71 If you say Y here, then the kernel will try to autodetect raid 72 arrays as part of its boot process. 73 74 If you don't use raid and say Y, this autodetection can cause 75 a several-second delay in the boot time due to various 76 synchronisation steps that are part of this step. 77 78 If unsure, say Y. 79 80config MD_BITMAP_FILE 81 bool "MD bitmap file support (deprecated)" 82 default y 83 depends on MD_BITMAP 84 help 85 If you say Y here, support for write intent bitmaps in files on an 86 external file system is enabled. This is an alternative to the internal 87 bitmaps near the MD superblock, and very problematic code that abuses 88 various kernel APIs and can only work with files on a file system not 89 actually sitting on the MD device. 90 91config MD_LINEAR 92 tristate "Linear (append) mode" 93 depends on BLK_DEV_MD 94 help 95 If you say Y here, then your multiple devices driver will be able to 96 use the so-called linear mode, i.e. it will combine the hard disk 97 partitions by simply appending one to the other. 98 99 To compile this as a module, choose M here: the module 100 will be called linear. 101 102 If unsure, say Y. 103 104config MD_RAID0 105 tristate "RAID-0 (striping) mode" 106 depends on BLK_DEV_MD 107 help 108 If you say Y here, then your multiple devices driver will be able to 109 use the so-called raid0 mode, i.e. it will combine the hard disk 110 partitions into one logical device in such a fashion as to fill them 111 up evenly, one chunk here and one chunk there. This will increase 112 the throughput rate if the partitions reside on distinct disks. 113 114 Information about Software RAID on Linux is contained in the 115 Software-RAID mini-HOWTO, available from 116 <https://www.tldp.org/docs.html#howto>. There you will also 117 learn where to get the supporting user space utilities raidtools. 118 119 To compile this as a module, choose M here: the module 120 will be called raid0. 121 122 If unsure, say Y. 123 124config MD_RAID1 125 tristate "RAID-1 (mirroring) mode" 126 depends on BLK_DEV_MD 127 help 128 A RAID-1 set consists of several disk drives which are exact copies 129 of each other. In the event of a mirror failure, the RAID driver 130 will continue to use the operational mirrors in the set, providing 131 an error free MD (multiple device) to the higher levels of the 132 kernel. In a set with N drives, the available space is the capacity 133 of a single drive, and the set protects against a failure of (N - 1) 134 drives. 135 136 Information about Software RAID on Linux is contained in the 137 Software-RAID mini-HOWTO, available from 138 <https://www.tldp.org/docs.html#howto>. There you will also 139 learn where to get the supporting user space utilities raidtools. 140 141 If you want to use such a RAID-1 set, say Y. To compile this code 142 as a module, choose M here: the module will be called raid1. 143 144 If unsure, say Y. 145 146config MD_RAID10 147 tristate "RAID-10 (mirrored striping) mode" 148 depends on BLK_DEV_MD 149 help 150 RAID-10 provides a combination of striping (RAID-0) and 151 mirroring (RAID-1) with easier configuration and more flexible 152 layout. 153 Unlike RAID-0, but like RAID-1, RAID-10 requires all devices to 154 be the same size (or at least, only as much as the smallest device 155 will be used). 156 RAID-10 provides a variety of layouts that provide different levels 157 of redundancy and performance. 158 159 RAID-10 requires mdadm-1.7.0 or later, available at: 160 161 https://www.kernel.org/pub/linux/utils/raid/mdadm/ 162 163 If unsure, say Y. 164 165config MD_RAID456 166 tristate "RAID-4/RAID-5/RAID-6 mode" 167 depends on BLK_DEV_MD 168 select RAID6_PQ 169 select CRC32 170 select ASYNC_MEMCPY 171 select ASYNC_XOR 172 select ASYNC_PQ 173 select ASYNC_RAID6_RECOV 174 help 175 A RAID-5 set of N drives with a capacity of C MB per drive provides 176 the capacity of C * (N - 1) MB, and protects against a failure 177 of a single drive. For a given sector (row) number, (N - 1) drives 178 contain data sectors, and one drive contains the parity protection. 179 For a RAID-4 set, the parity blocks are present on a single drive, 180 while a RAID-5 set distributes the parity across the drives in one 181 of the available parity distribution methods. 182 183 A RAID-6 set of N drives with a capacity of C MB per drive 184 provides the capacity of C * (N - 2) MB, and protects 185 against a failure of any two drives. For a given sector 186 (row) number, (N - 2) drives contain data sectors, and two 187 drives contains two independent redundancy syndromes. Like 188 RAID-5, RAID-6 distributes the syndromes across the drives 189 in one of the available parity distribution methods. 190 191 Information about Software RAID on Linux is contained in the 192 Software-RAID mini-HOWTO, available from 193 <https://www.tldp.org/docs.html#howto>. There you will also 194 learn where to get the supporting user space utilities raidtools. 195 196 If you want to use such a RAID-4/RAID-5/RAID-6 set, say Y. To 197 compile this code as a module, choose M here: the module 198 will be called raid456. 199 200 If unsure, say Y. 201 202config MD_CLUSTER 203 tristate "Cluster Support for MD" 204 select MD_BITMAP 205 depends on BLK_DEV_MD 206 depends on DLM 207 default n 208 help 209 Clustering support for MD devices. This enables locking and 210 synchronization across multiple systems on the cluster, so all 211 nodes in the cluster can access the MD devices simultaneously. 212 213 This brings the redundancy (and uptime) of RAID levels across the 214 nodes of the cluster. Currently, it can work with raid1 and raid10 215 (limited support). 216 217 If unsure, say N. 218 219source "drivers/md/bcache/Kconfig" 220 221config BLK_DEV_DM_BUILTIN 222 bool 223 224config BLK_DEV_DM 225 tristate "Device mapper support" 226 select BLOCK_HOLDER_DEPRECATED if SYSFS 227 select BLK_DEV_DM_BUILTIN 228 select BLK_MQ_STACKING 229 depends on DAX || DAX=n 230 help 231 Device-mapper is a low level volume manager. It works by allowing 232 people to specify mappings for ranges of logical sectors. Various 233 mapping types are available, in addition people may write their own 234 modules containing custom mappings if they wish. 235 236 Higher level volume managers such as LVM2 use this driver. 237 238 To compile this as a module, choose M here: the module will be 239 called dm-mod. 240 241 If unsure, say N. 242 243config DM_DEBUG 244 bool "Device mapper debugging support" 245 depends on BLK_DEV_DM 246 help 247 Enable this for messages that may help debug device-mapper problems. 248 249 If unsure, say N. 250 251config DM_BUFIO 252 tristate 253 depends on BLK_DEV_DM 254 help 255 This interface allows you to do buffered I/O on a device and acts 256 as a cache, holding recently-read blocks in memory and performing 257 delayed writes. 258 259config DM_DEBUG_BLOCK_MANAGER_LOCKING 260 bool "Block manager locking" 261 depends on DM_BUFIO 262 help 263 Block manager locking can catch various metadata corruption issues. 264 265 If unsure, say N. 266 267config DM_DEBUG_BLOCK_STACK_TRACING 268 bool "Keep stack trace of persistent data block lock holders" 269 depends on STACKTRACE_SUPPORT && DM_DEBUG_BLOCK_MANAGER_LOCKING 270 select STACKTRACE 271 help 272 Enable this for messages that may help debug problems with the 273 block manager locking used by thin provisioning and caching. 274 275 If unsure, say N. 276 277config DM_BIO_PRISON 278 tristate 279 depends on BLK_DEV_DM 280 help 281 Some bio locking schemes used by other device-mapper targets 282 including thin provisioning. 283 284source "drivers/md/persistent-data/Kconfig" 285 286config DM_UNSTRIPED 287 tristate "Unstriped target" 288 depends on BLK_DEV_DM 289 help 290 Unstripes I/O so it is issued solely on a single drive in a HW 291 RAID0 or dm-striped target. 292 293config DM_CRYPT 294 tristate "Crypt target support" 295 depends on BLK_DEV_DM 296 depends on (ENCRYPTED_KEYS || ENCRYPTED_KEYS=n) 297 depends on (TRUSTED_KEYS || TRUSTED_KEYS=n) 298 select CRC32 299 select CRYPTO 300 select CRYPTO_CBC 301 select CRYPTO_ESSIV 302 select CRYPTO_LIB_MD5 # needed by lmk IV mode 303 help 304 This device-mapper target allows you to create a device that 305 transparently encrypts the data on it. You'll need to activate 306 the ciphers you're going to use in the cryptoapi configuration. 307 308 For further information on dm-crypt and userspace tools see: 309 <https://gitlab.com/cryptsetup/cryptsetup/wikis/DMCrypt> 310 311 To compile this code as a module, choose M here: the module will 312 be called dm-crypt. 313 314 If unsure, say N. 315 316config DM_SNAPSHOT 317 tristate "Snapshot target" 318 depends on BLK_DEV_DM 319 select DM_BUFIO 320 help 321 Allow volume managers to take writable snapshots of a device. 322 323config DM_THIN_PROVISIONING 324 tristate "Thin provisioning target" 325 depends on BLK_DEV_DM 326 select DM_PERSISTENT_DATA 327 select DM_BIO_PRISON 328 help 329 Provides thin provisioning and snapshots that share a data store. 330 331config DM_CACHE 332 tristate "Cache target (EXPERIMENTAL)" 333 depends on BLK_DEV_DM 334 default n 335 select DM_PERSISTENT_DATA 336 select DM_BIO_PRISON 337 help 338 dm-cache attempts to improve performance of a block device by 339 moving frequently used data to a smaller, higher performance 340 device. Different 'policy' plugins can be used to change the 341 algorithms used to select which blocks are promoted, demoted, 342 cleaned etc. It supports writeback and writethrough modes. 343 344config DM_CACHE_SMQ 345 tristate "Stochastic MQ Cache Policy (EXPERIMENTAL)" 346 depends on DM_CACHE 347 default y 348 help 349 A cache policy that uses a multiqueue ordered by recent hits 350 to select which blocks should be promoted and demoted. 351 This is meant to be a general purpose policy. It prioritises 352 reads over writes. This SMQ policy (vs MQ) offers the promise 353 of less memory utilization, improved performance and increased 354 adaptability in the face of changing workloads. 355 356config DM_WRITECACHE 357 tristate "Writecache target" 358 depends on BLK_DEV_DM 359 help 360 The writecache target caches writes on persistent memory or SSD. 361 It is intended for databases or other programs that need extremely 362 low commit latency. 363 364 The writecache target doesn't cache reads because reads are supposed 365 to be cached in standard RAM. 366 367config DM_EBS 368 tristate "Emulated block size target (EXPERIMENTAL)" 369 depends on BLK_DEV_DM && !HIGHMEM 370 select DM_BUFIO 371 help 372 dm-ebs emulates smaller logical block size on backing devices 373 with larger ones (e.g. 512 byte sectors on 4K native disks). 374 375config DM_ERA 376 tristate "Era target (EXPERIMENTAL)" 377 depends on BLK_DEV_DM 378 default n 379 select DM_PERSISTENT_DATA 380 select DM_BIO_PRISON 381 help 382 dm-era tracks which parts of a block device are written to 383 over time. Useful for maintaining cache coherency when using 384 vendor snapshots. 385 386config DM_CLONE 387 tristate "Clone target (EXPERIMENTAL)" 388 depends on BLK_DEV_DM 389 default n 390 select DM_PERSISTENT_DATA 391 help 392 dm-clone produces a one-to-one copy of an existing, read-only source 393 device into a writable destination device. The cloned device is 394 visible/mountable immediately and the copy of the source device to the 395 destination device happens in the background, in parallel with user 396 I/O. 397 398 If unsure, say N. 399 400config DM_MIRROR 401 tristate "Mirror target" 402 depends on BLK_DEV_DM 403 help 404 Allow volume managers to mirror logical volumes, also 405 needed for live data migration tools such as 'pvmove'. 406 407config DM_LOG_USERSPACE 408 tristate "Mirror userspace logging" 409 depends on DM_MIRROR && NET 410 select CONNECTOR 411 help 412 The userspace logging module provides a mechanism for 413 relaying the dm-dirty-log API to userspace. Log designs 414 which are more suited to userspace implementation (e.g. 415 shared storage logs) or experimental logs can be implemented 416 by leveraging this framework. 417 418config DM_RAID 419 tristate "RAID 1/4/5/6/10 target" 420 depends on BLK_DEV_DM 421 select MD_RAID0 422 select MD_RAID1 423 select MD_RAID10 424 select MD_RAID456 425 select MD_BITMAP 426 select BLK_DEV_MD 427 help 428 A dm target that supports RAID1, RAID10, RAID4, RAID5 and RAID6 mappings 429 430 A RAID-5 set of N drives with a capacity of C MB per drive provides 431 the capacity of C * (N - 1) MB, and protects against a failure 432 of a single drive. For a given sector (row) number, (N - 1) drives 433 contain data sectors, and one drive contains the parity protection. 434 For a RAID-4 set, the parity blocks are present on a single drive, 435 while a RAID-5 set distributes the parity across the drives in one 436 of the available parity distribution methods. 437 438 A RAID-6 set of N drives with a capacity of C MB per drive 439 provides the capacity of C * (N - 2) MB, and protects 440 against a failure of any two drives. For a given sector 441 (row) number, (N - 2) drives contain data sectors, and two 442 drives contains two independent redundancy syndromes. Like 443 RAID-5, RAID-6 distributes the syndromes across the drives 444 in one of the available parity distribution methods. 445 446config DM_ZERO 447 tristate "Zero target" 448 depends on BLK_DEV_DM 449 help 450 A target that discards writes, and returns all zeroes for 451 reads. Useful in some recovery situations. 452 453config DM_MULTIPATH 454 tristate "Multipath target" 455 depends on BLK_DEV_DM 456 # nasty syntax but means make DM_MULTIPATH independent 457 # of SCSI_DH if the latter isn't defined but if 458 # it is, DM_MULTIPATH must depend on it. We get a build 459 # error if SCSI_DH=m and DM_MULTIPATH=y 460 depends on !SCSI_DH || SCSI 461 help 462 Allow volume managers to support multipath hardware. 463 464config DM_MULTIPATH_QL 465 tristate "I/O Path Selector based on the number of in-flight I/Os" 466 depends on DM_MULTIPATH 467 help 468 This path selector is a dynamic load balancer which selects 469 the path with the least number of in-flight I/Os. 470 471 If unsure, say N. 472 473config DM_MULTIPATH_ST 474 tristate "I/O Path Selector based on the service time" 475 depends on DM_MULTIPATH 476 help 477 This path selector is a dynamic load balancer which selects 478 the path expected to complete the incoming I/O in the shortest 479 time. 480 481 If unsure, say N. 482 483config DM_MULTIPATH_HST 484 tristate "I/O Path Selector based on historical service time" 485 depends on DM_MULTIPATH 486 help 487 This path selector is a dynamic load balancer which selects 488 the path expected to complete the incoming I/O in the shortest 489 time by comparing estimated service time (based on historical 490 service time). 491 492 If unsure, say N. 493 494config DM_MULTIPATH_IOA 495 tristate "I/O Path Selector based on CPU submission" 496 depends on DM_MULTIPATH 497 help 498 This path selector selects the path based on the CPU the IO is 499 executed on and the CPU to path mapping setup at path addition time. 500 501 If unsure, say N. 502 503config DM_DELAY 504 tristate "I/O delaying target" 505 depends on BLK_DEV_DM 506 help 507 A target that delays reads and/or writes and can send 508 them to different devices. Useful for testing. 509 510 If unsure, say N. 511 512config DM_DUST 513 tristate "Bad sector simulation target" 514 depends on BLK_DEV_DM 515 help 516 A target that simulates bad sector behavior. 517 Useful for testing. 518 519 If unsure, say N. 520 521config DM_INIT 522 bool "DM \"dm-mod.create=\" parameter support" 523 depends on BLK_DEV_DM=y 524 help 525 Enable "dm-mod.create=" parameter to create mapped devices at init time. 526 This option is useful to allow mounting rootfs without requiring an 527 initramfs. 528 See Documentation/admin-guide/device-mapper/dm-init.rst for dm-mod.create="..." 529 format. 530 531 If unsure, say N. 532 533config DM_UEVENT 534 bool "DM uevents" 535 depends on BLK_DEV_DM 536 help 537 Generate udev events for DM events. 538 539config DM_FLAKEY 540 tristate "Flakey target" 541 depends on BLK_DEV_DM 542 help 543 A target that intermittently fails I/O for debugging purposes. 544 545config DM_VERITY 546 tristate "Verity target support" 547 depends on BLK_DEV_DM 548 select CRYPTO 549 select CRYPTO_HASH 550 select CRYPTO_LIB_SHA256 551 select DM_BUFIO 552 help 553 This device-mapper target creates a read-only device that 554 transparently validates the data on one underlying device against 555 a pre-generated tree of cryptographic checksums stored on a second 556 device. 557 558 You'll need to activate the digests you're going to use in the 559 cryptoapi configuration. 560 561 To compile this code as a module, choose M here: the module will 562 be called dm-verity. 563 564 If unsure, say N. 565 566config DM_VERITY_VERIFY_ROOTHASH_SIG 567 bool "Verity data device root hash signature verification support" 568 depends on DM_VERITY 569 select SYSTEM_DATA_VERIFICATION 570 help 571 Add ability for dm-verity device to be validated if the 572 pre-generated tree of cryptographic checksums passed has a pkcs#7 573 signature file that can validate the roothash of the tree. 574 575 By default, rely on the builtin trusted keyring. 576 577 If unsure, say N. 578 579config DM_VERITY_VERIFY_ROOTHASH_SIG_SECONDARY_KEYRING 580 bool "Verity data device root hash signature verification with secondary keyring" 581 depends on DM_VERITY_VERIFY_ROOTHASH_SIG 582 depends on SECONDARY_TRUSTED_KEYRING 583 help 584 Rely on the secondary trusted keyring to verify dm-verity signatures. 585 586 If unsure, say N. 587 588config DM_VERITY_VERIFY_ROOTHASH_SIG_PLATFORM_KEYRING 589 bool "Verity data device root hash signature verification with platform keyring" 590 default DM_VERITY_VERIFY_ROOTHASH_SIG_SECONDARY_KEYRING 591 depends on DM_VERITY_VERIFY_ROOTHASH_SIG 592 depends on INTEGRITY_PLATFORM_KEYRING 593 help 594 Rely also on the platform keyring to verify dm-verity signatures. 595 596 If unsure, say N. 597 598config DM_VERITY_FEC 599 bool "Verity forward error correction support" 600 depends on DM_VERITY 601 select REED_SOLOMON 602 select REED_SOLOMON_DEC8 603 help 604 Add forward error correction support to dm-verity. This option 605 makes it possible to use pre-generated error correction data to 606 recover from corrupted blocks. 607 608 If unsure, say N. 609 610config DM_SWITCH 611 tristate "Switch target support (EXPERIMENTAL)" 612 depends on BLK_DEV_DM 613 help 614 This device-mapper target creates a device that supports an arbitrary 615 mapping of fixed-size regions of I/O across a fixed set of paths. 616 The path used for any specific region can be switched dynamically 617 by sending the target a message. 618 619 To compile this code as a module, choose M here: the module will 620 be called dm-switch. 621 622 If unsure, say N. 623 624config DM_LOG_WRITES 625 tristate "Log writes target support" 626 depends on BLK_DEV_DM 627 help 628 This device-mapper target takes two devices, one device to use 629 normally, one to log all write operations done to the first device. 630 This is for use by file system developers wishing to verify that 631 their fs is writing a consistent file system at all times by allowing 632 them to replay the log in a variety of ways and to check the 633 contents. 634 635 To compile this code as a module, choose M here: the module will 636 be called dm-log-writes. 637 638 If unsure, say N. 639 640config DM_INTEGRITY 641 tristate "Integrity target support" 642 depends on BLK_DEV_DM 643 select BLK_DEV_INTEGRITY 644 select DM_BUFIO 645 select CRYPTO 646 select CRYPTO_SKCIPHER 647 select ASYNC_XOR 648 select DM_AUDIT if AUDIT 649 help 650 This device-mapper target emulates a block device that has 651 additional per-sector tags that can be used for storing 652 integrity information. 653 654 This integrity target is used with the dm-crypt target to 655 provide authenticated disk encryption or it can be used 656 standalone. 657 658 To compile this code as a module, choose M here: the module will 659 be called dm-integrity. 660 661config DM_ZONED 662 tristate "Drive-managed zoned block device target support" 663 depends on BLK_DEV_DM 664 depends on BLK_DEV_ZONED 665 select CRC32 666 help 667 This device-mapper target takes a host-managed or host-aware zoned 668 block device and exposes most of its capacity as a regular block 669 device (drive-managed zoned block device) without any write 670 constraints. This is mainly intended for use with file systems that 671 do not natively support zoned block devices but still want to 672 benefit from the increased capacity offered by SMR disks. Other uses 673 by applications using raw block devices (for example object stores) 674 are also possible. 675 676 To compile this code as a module, choose M here: the module will 677 be called dm-zoned. 678 679 If unsure, say N. 680 681config DM_AUDIT 682 bool "DM audit events" 683 depends on BLK_DEV_DM 684 depends on AUDIT 685 help 686 Generate audit events for device-mapper. 687 688 Enables audit logging of several security relevant events in the 689 particular device-mapper targets, especially the integrity target. 690 691source "drivers/md/dm-vdo/Kconfig" 692 693source "drivers/md/dm-pcache/Kconfig" 694 695endif # MD 696