Kconfig 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. # SPDX-License-Identifier: GPL-2.0
  2. #
  3. # Block layer core configuration
  4. #
  5. menuconfig BLOCK
  6. bool "Enable the block layer" if EXPERT
  7. default y
  8. select SBITMAP
  9. select SRCU
  10. help
  11. Provide block layer support for the kernel.
  12. Disable this option to remove the block layer support from the
  13. kernel. This may be useful for embedded devices.
  14. If this option is disabled:
  15. - block device files will become unusable
  16. - some filesystems (such as ext3) will become unavailable.
  17. Also, SCSI character devices and USB storage will be disabled since
  18. they make use of various block layer definitions and facilities.
  19. Say Y here unless you know you really don't want to mount disks and
  20. suchlike.
  21. if BLOCK
  22. config BLK_RQ_ALLOC_TIME
  23. bool
  24. config BLK_SCSI_REQUEST
  25. bool
  26. config BLK_CGROUP_RWSTAT
  27. bool
  28. config BLK_DEV_BSG
  29. bool "Block layer SG support v4"
  30. default y
  31. select BLK_SCSI_REQUEST
  32. help
  33. Saying Y here will enable generic SG (SCSI generic) v4 support
  34. for any block device.
  35. Unlike SG v3 (aka block/scsi_ioctl.c drivers/scsi/sg.c), SG v4
  36. can handle complicated SCSI commands: tagged variable length cdbs
  37. with bidirectional data transfers and generic request/response
  38. protocols (e.g. Task Management Functions and SMP in Serial
  39. Attached SCSI).
  40. This option is required by recent UDEV versions to properly
  41. access device serial numbers, etc.
  42. If unsure, say Y.
  43. config BLK_DEV_BSGLIB
  44. bool "Block layer SG support v4 helper lib"
  45. select BLK_DEV_BSG
  46. select BLK_SCSI_REQUEST
  47. help
  48. Subsystems will normally enable this if needed. Users will not
  49. normally need to manually enable this.
  50. If unsure, say N.
  51. config BLK_DEV_INTEGRITY
  52. bool "Block layer data integrity support"
  53. help
  54. Some storage devices allow extra information to be
  55. stored/retrieved to help protect the data. The block layer
  56. data integrity option provides hooks which can be used by
  57. filesystems to ensure better data integrity.
  58. Say yes here if you have a storage device that provides the
  59. T10/SCSI Data Integrity Field or the T13/ATA External Path
  60. Protection. If in doubt, say N.
  61. config BLK_DEV_INTEGRITY_T10
  62. tristate
  63. depends on BLK_DEV_INTEGRITY
  64. select CRC_T10DIF
  65. config BLK_DEV_ZONED
  66. bool "Zoned block device support"
  67. select MQ_IOSCHED_DEADLINE
  68. help
  69. Block layer zoned block device support. This option enables
  70. support for ZAC/ZBC/ZNS host-managed and host-aware zoned block
  71. devices.
  72. Say yes here if you have a ZAC, ZBC, or ZNS storage device.
  73. config BLK_DEV_THROTTLING
  74. bool "Block layer bio throttling support"
  75. depends on BLK_CGROUP=y
  76. select BLK_CGROUP_RWSTAT
  77. help
  78. Block layer bio throttling support. It can be used to limit
  79. the IO rate to a device. IO rate policies are per cgroup and
  80. one needs to mount and use blkio cgroup controller for creating
  81. cgroups and specifying per device IO rate policies.
  82. See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information.
  83. config BLK_DEV_THROTTLING_LOW
  84. bool "Block throttling .low limit interface support (EXPERIMENTAL)"
  85. depends on BLK_DEV_THROTTLING
  86. help
  87. Add .low limit interface for block throttling. The low limit is a best
  88. effort limit to prioritize cgroups. Depending on the setting, the limit
  89. can be used to protect cgroups in terms of bandwidth/iops and better
  90. utilize disk resource.
  91. Note, this is an experimental interface and could be changed someday.
  92. config BLK_CMDLINE_PARSER
  93. bool "Block device command line partition parser"
  94. help
  95. Enabling this option allows you to specify the partition layout from
  96. the kernel boot args. This is typically of use for embedded devices
  97. which don't otherwise have any standardized method for listing the
  98. partitions on a block device.
  99. See Documentation/block/cmdline-partition.rst for more information.
  100. config BLK_WBT
  101. bool "Enable support for block device writeback throttling"
  102. help
  103. Enabling this option enables the block layer to throttle buffered
  104. background writeback from the VM, making it more smooth and having
  105. less impact on foreground operations. The throttling is done
  106. dynamically on an algorithm loosely based on CoDel, factoring in
  107. the realtime performance of the disk.
  108. config BLK_WBT_MQ
  109. bool "Enable writeback throttling by default"
  110. default y
  111. depends on BLK_WBT
  112. help
  113. Enable writeback throttling by default for request-based block devices.
  114. config BLK_CGROUP_IOLATENCY
  115. bool "Enable support for latency based cgroup IO protection"
  116. depends on BLK_CGROUP=y
  117. help
  118. Enabling this option enables the .latency interface for IO throttling.
  119. The IO controller will attempt to maintain average IO latencies below
  120. the configured latency target, throttling anybody with a higher latency
  121. target than the victimized group.
  122. Note, this is an experimental interface and could be changed someday.
  123. config BLK_CGROUP_IOCOST
  124. bool "Enable support for cost model based cgroup IO controller"
  125. depends on BLK_CGROUP=y
  126. select BLK_RQ_IO_DATA_LEN
  127. select BLK_RQ_ALLOC_TIME
  128. help
  129. Enabling this option enables the .weight interface for cost
  130. model based proportional IO control. The IO controller
  131. distributes IO capacity between different groups based on
  132. their share of the overall weight distribution.
  133. config BLK_CGROUP_IOPRIO
  134. bool "Cgroup I/O controller for assigning an I/O priority class"
  135. depends on BLK_CGROUP
  136. help
  137. Enable the .prio interface for assigning an I/O priority class to
  138. requests. The I/O priority class affects the order in which an I/O
  139. scheduler and block devices process requests. Only some I/O schedulers
  140. and some block devices support I/O priorities.
  141. config BLK_DEBUG_FS
  142. bool "Block layer debugging information in debugfs"
  143. default y
  144. depends on DEBUG_FS
  145. help
  146. Include block layer debugging information in debugfs. This information
  147. is mostly useful for kernel developers, but it doesn't incur any cost
  148. at runtime.
  149. Unless you are building a kernel for a tiny system, you should
  150. say Y here.
  151. config BLK_DEBUG_FS_ZONED
  152. bool
  153. default BLK_DEBUG_FS && BLK_DEV_ZONED
  154. config BLK_SED_OPAL
  155. bool "Logic for interfacing with Opal enabled SEDs"
  156. help
  157. Builds Logic for interfacing with Opal enabled controllers.
  158. Enabling this option enables users to setup/unlock/lock
  159. Locking ranges for SED devices using the Opal protocol.
  160. config BLK_INLINE_ENCRYPTION
  161. bool "Enable inline encryption support in block layer"
  162. help
  163. Build the blk-crypto subsystem. Enabling this lets the
  164. block layer handle encryption, so users can take
  165. advantage of inline encryption hardware if present.
  166. config BLK_INLINE_ENCRYPTION_FALLBACK
  167. bool "Enable crypto API fallback for blk-crypto"
  168. depends on BLK_INLINE_ENCRYPTION
  169. select CRYPTO
  170. select CRYPTO_SKCIPHER
  171. help
  172. Enabling this lets the block layer handle inline encryption
  173. by falling back to the kernel crypto API when inline
  174. encryption hardware is not present.
  175. menu "Partition Types"
  176. source "block/partitions/Kconfig"
  177. endmenu
  178. endif # BLOCK
  179. config BLOCK_COMPAT
  180. bool
  181. depends on BLOCK && COMPAT
  182. default y
  183. config BLK_MQ_PCI
  184. bool
  185. depends on BLOCK && PCI
  186. default y
  187. config BLK_MQ_VIRTIO
  188. tristate
  189. depends on BLOCK && VIRTIO
  190. default y
  191. config BLK_MQ_RDMA
  192. bool
  193. depends on BLOCK && INFINIBAND
  194. default y
  195. config BLK_PM
  196. def_bool BLOCK && PM
  197. source "block/Kconfig.iosched"