Kconfig 21 KB

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