xref: /linux/block/Kconfig (revision 5ef1630586317e92c9ebd7b4ce48f393b7ff790f)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
23a65dfe8SJens Axboe#
33a65dfe8SJens Axboe# Block layer core configuration
43a65dfe8SJens Axboe#
516ed002fSJan Engelhardtmenuconfig BLOCK
66a108a14SDavid Rientjes       bool "Enable the block layer" if EXPERT
79361401eSDavid Howells       default y
888459642SOmar Sandoval       select SBITMAP
96a83e74dSBart Van Assche       select SRCU
109361401eSDavid Howells       help
11ee86418dSNick Andrew	 Provide block layer support for the kernel.
129361401eSDavid Howells
13ee86418dSNick Andrew	 Disable this option to remove the block layer support from the
14ee86418dSNick Andrew	 kernel. This may be useful for embedded devices.
15ee86418dSNick Andrew
16ee86418dSNick Andrew	 If this option is disabled:
17ee86418dSNick Andrew
18ee86418dSNick Andrew	   - block device files will become unusable
19ee86418dSNick Andrew	   - some filesystems (such as ext3) will become unavailable.
20ee86418dSNick Andrew
21ee86418dSNick Andrew	 Also, SCSI character devices and USB storage will be disabled since
22ee86418dSNick Andrew	 they make use of various block layer definitions and facilities.
239361401eSDavid Howells
249361401eSDavid Howells	 Say Y here unless you know you really don't want to mount disks and
259361401eSDavid Howells	 suchlike.
269361401eSDavid Howells
279361401eSDavid Howellsif BLOCK
289361401eSDavid Howells
296f816b4bSTejun Heoconfig BLK_RQ_ALLOC_TIME
306f816b4bSTejun Heo	bool
316f816b4bSTejun Heo
321d156646STejun Heoconfig BLK_CGROUP_RWSTAT
331d156646STejun Heo	bool
341d156646STejun Heo
3578011042SChristoph Hellwigconfig BLK_DEV_BSG_COMMON
3678011042SChristoph Hellwig	tristate
37ee86418dSNick Andrew
38*5ef16305SChristoph Hellwigconfig BLK_ICQ
39*5ef16305SChristoph Hellwig	bool
40*5ef16305SChristoph Hellwig
41aa387cc8SMike Christieconfig BLK_DEV_BSGLIB
42aa387cc8SMike Christie	bool "Block layer SG support v4 helper lib"
4378011042SChristoph Hellwig	select BLK_DEV_BSG_COMMON
44aa387cc8SMike Christie	help
45aa387cc8SMike Christie	  Subsystems will normally enable this if needed. Users will not
46aa387cc8SMike Christie	  normally need to manually enable this.
47aa387cc8SMike Christie
48aa387cc8SMike Christie	  If unsure, say N.
49aa387cc8SMike Christie
507ba1ba12SMartin K. Petersenconfig BLK_DEV_INTEGRITY
517ba1ba12SMartin K. Petersen	bool "Block layer data integrity support"
52a7f7f624SMasahiro Yamada	help
537ba1ba12SMartin K. Petersen	Some storage devices allow extra information to be
547ba1ba12SMartin K. Petersen	stored/retrieved to help protect the data.  The block layer
557ba1ba12SMartin K. Petersen	data integrity option provides hooks which can be used by
567ba1ba12SMartin K. Petersen	filesystems to ensure better data integrity.
577ba1ba12SMartin K. Petersen
587ba1ba12SMartin K. Petersen	Say yes here if you have a storage device that provides the
597ba1ba12SMartin K. Petersen	T10/SCSI Data Integrity Field or the T13/ATA External Path
607ba1ba12SMartin K. Petersen	Protection.  If in doubt, say N.
617ba1ba12SMartin K. Petersen
62a754bd5fSHerbert Xuconfig BLK_DEV_INTEGRITY_T10
63a754bd5fSHerbert Xu	tristate
64a754bd5fSHerbert Xu	depends on BLK_DEV_INTEGRITY
65a754bd5fSHerbert Xu	select CRC_T10DIF
66a754bd5fSHerbert Xu
676a0cb1bcSHannes Reineckeconfig BLK_DEV_ZONED
686a0cb1bcSHannes Reinecke	bool "Zoned block device support"
69b9aef63aSDamien Le Moal	select MQ_IOSCHED_DEADLINE
70a7f7f624SMasahiro Yamada	help
716a0cb1bcSHannes Reinecke	Block layer zoned block device support. This option enables
72240e6ee2SKeith Busch	support for ZAC/ZBC/ZNS host-managed and host-aware zoned block
73240e6ee2SKeith Busch	devices.
746a0cb1bcSHannes Reinecke
75240e6ee2SKeith Busch	Say yes here if you have a ZAC, ZBC, or ZNS storage device.
766a0cb1bcSHannes Reinecke
77e43473b7SVivek Goyalconfig BLK_DEV_THROTTLING
78e43473b7SVivek Goyal	bool "Block layer bio throttling support"
79df252bdeSMasahiro Yamada	depends on BLK_CGROUP
801d156646STejun Heo	select BLK_CGROUP_RWSTAT
81a7f7f624SMasahiro Yamada	help
82e43473b7SVivek Goyal	Block layer bio throttling support. It can be used to limit
83e43473b7SVivek Goyal	the IO rate to a device. IO rate policies are per cgroup and
84e43473b7SVivek Goyal	one needs to mount and use blkio cgroup controller for creating
85e43473b7SVivek Goyal	cgroups and specifying per device IO rate policies.
86e43473b7SVivek Goyal
87da82c92fSMauro Carvalho Chehab	See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information.
88e43473b7SVivek Goyal
89327ffb9bSShaohua Liconfig BLK_DEV_THROTTLING_LOW
90327ffb9bSShaohua Li	bool "Block throttling .low limit interface support (EXPERIMENTAL)"
91327ffb9bSShaohua Li	depends on BLK_DEV_THROTTLING
92a7f7f624SMasahiro Yamada	help
93327ffb9bSShaohua Li	Add .low limit interface for block throttling. The low limit is a best
94327ffb9bSShaohua Li	effort limit to prioritize cgroups. Depending on the setting, the limit
95327ffb9bSShaohua Li	can be used to protect cgroups in terms of bandwidth/iops and better
96327ffb9bSShaohua Li	utilize disk resource.
97327ffb9bSShaohua Li
98327ffb9bSShaohua Li	Note, this is an experimental interface and could be changed someday.
99327ffb9bSShaohua Li
10087760e5eSJens Axboeconfig BLK_WBT
10187760e5eSJens Axboe	bool "Enable support for block device writeback throttling"
102a7f7f624SMasahiro Yamada	help
10387760e5eSJens Axboe	Enabling this option enables the block layer to throttle buffered
10487760e5eSJens Axboe	background writeback from the VM, making it more smooth and having
10587760e5eSJens Axboe	less impact on foreground operations. The throttling is done
10687760e5eSJens Axboe	dynamically on an algorithm loosely based on CoDel, factoring in
10787760e5eSJens Axboe	the realtime performance of the disk.
10887760e5eSJens Axboe
1095f6776baSBart Van Asscheconfig BLK_WBT_MQ
1105f6776baSBart Van Assche	bool "Enable writeback throttling by default"
1115f6776baSBart Van Assche	default y
1125f6776baSBart Van Assche	depends on BLK_WBT
1135f6776baSBart Van Assche	help
1145f6776baSBart Van Assche	Enable writeback throttling by default for request-based block devices.
1155f6776baSBart Van Assche
116d7067512SJosef Bacikconfig BLK_CGROUP_IOLATENCY
117d7067512SJosef Bacik	bool "Enable support for latency based cgroup IO protection"
118df252bdeSMasahiro Yamada	depends on BLK_CGROUP
119a7f7f624SMasahiro Yamada	help
120d7067512SJosef Bacik	Enabling this option enables the .latency interface for IO throttling.
121d7067512SJosef Bacik	The IO controller will attempt to maintain average IO latencies below
122d7067512SJosef Bacik	the configured latency target, throttling anybody with a higher latency
123d7067512SJosef Bacik	target than the victimized group.
124d7067512SJosef Bacik
125d7067512SJosef Bacik	Note, this is an experimental interface and could be changed someday.
126d7067512SJosef Bacik
127d2bcbeabSMuneendra Kumarconfig BLK_CGROUP_FC_APPID
128d2bcbeabSMuneendra Kumar	bool "Enable support to track FC I/O Traffic across cgroup applications"
129d2500a0cSMartin K. Petersen	depends on BLK_CGROUP && NVME_FC
130d2bcbeabSMuneendra Kumar	help
131d2bcbeabSMuneendra Kumar	  Enabling this option enables the support to track FC I/O traffic across
132d2bcbeabSMuneendra Kumar	  cgroup applications. It enables the Fabric and the storage targets to
133d2bcbeabSMuneendra Kumar	  identify, monitor, and handle FC traffic based on VM tags by inserting
134d2bcbeabSMuneendra Kumar	  application specific identification into the FC frame.
135d2bcbeabSMuneendra Kumar
1367caa4715STejun Heoconfig BLK_CGROUP_IOCOST
1377caa4715STejun Heo	bool "Enable support for cost model based cgroup IO controller"
138df252bdeSMasahiro Yamada	depends on BLK_CGROUP
139cd006509STejun Heo	select BLK_RQ_IO_DATA_LEN
1407caa4715STejun Heo	select BLK_RQ_ALLOC_TIME
141a7f7f624SMasahiro Yamada	help
1427caa4715STejun Heo	Enabling this option enables the .weight interface for cost
1437caa4715STejun Heo	model based proportional IO control.  The IO controller
1447caa4715STejun Heo	distributes IO capacity between different groups based on
1457caa4715STejun Heo	their share of the overall weight distribution.
1467caa4715STejun Heo
147556910e3SBart Van Asscheconfig BLK_CGROUP_IOPRIO
148556910e3SBart Van Assche	bool "Cgroup I/O controller for assigning an I/O priority class"
149556910e3SBart Van Assche	depends on BLK_CGROUP
150556910e3SBart Van Assche	help
151556910e3SBart Van Assche	Enable the .prio interface for assigning an I/O priority class to
152556910e3SBart Van Assche	requests. The I/O priority class affects the order in which an I/O
153556910e3SBart Van Assche	scheduler and block devices process requests. Only some I/O schedulers
154556910e3SBart Van Assche	and some block devices support I/O priorities.
155556910e3SBart Van Assche
156400f73b2SOmar Sandovalconfig BLK_DEBUG_FS
157400f73b2SOmar Sandoval	bool "Block layer debugging information in debugfs"
158400f73b2SOmar Sandoval	default y
159400f73b2SOmar Sandoval	depends on DEBUG_FS
160a7f7f624SMasahiro Yamada	help
161400f73b2SOmar Sandoval	Include block layer debugging information in debugfs. This information
162400f73b2SOmar Sandoval	is mostly useful for kernel developers, but it doesn't incur any cost
163400f73b2SOmar Sandoval	at runtime.
164400f73b2SOmar Sandoval
165400f73b2SOmar Sandoval	Unless you are building a kernel for a tiny system, you should
166400f73b2SOmar Sandoval	say Y here.
167400f73b2SOmar Sandoval
1686a5ac984SBart Van Asscheconfig BLK_DEBUG_FS_ZONED
1696a5ac984SBart Van Assche       bool
1706a5ac984SBart Van Assche       default BLK_DEBUG_FS && BLK_DEV_ZONED
1716a5ac984SBart Van Assche
172455a7b23SScott Bauerconfig BLK_SED_OPAL
173455a7b23SScott Bauer	bool "Logic for interfacing with Opal enabled SEDs"
174a7f7f624SMasahiro Yamada	help
175455a7b23SScott Bauer	Builds Logic for interfacing with Opal enabled controllers.
176455a7b23SScott Bauer	Enabling this option enables users to setup/unlock/lock
177455a7b23SScott Bauer	Locking ranges for SED devices using the Opal protocol.
178455a7b23SScott Bauer
1791b262839SSatya Tangiralaconfig BLK_INLINE_ENCRYPTION
1801b262839SSatya Tangirala	bool "Enable inline encryption support in block layer"
1811b262839SSatya Tangirala	help
1821b262839SSatya Tangirala	  Build the blk-crypto subsystem. Enabling this lets the
1831b262839SSatya Tangirala	  block layer handle encryption, so users can take
1841b262839SSatya Tangirala	  advantage of inline encryption hardware if present.
1851b262839SSatya Tangirala
186488f6682SSatya Tangiralaconfig BLK_INLINE_ENCRYPTION_FALLBACK
187488f6682SSatya Tangirala	bool "Enable crypto API fallback for blk-crypto"
188488f6682SSatya Tangirala	depends on BLK_INLINE_ENCRYPTION
189488f6682SSatya Tangirala	select CRYPTO
190488f6682SSatya Tangirala	select CRYPTO_SKCIPHER
191488f6682SSatya Tangirala	help
192488f6682SSatya Tangirala	  Enabling this lets the block layer handle inline encryption
193488f6682SSatya Tangirala	  by falling back to the kernel crypto API when inline
194488f6682SSatya Tangirala	  encryption hardware is not present.
195488f6682SSatya Tangirala
1969be96f3fSAl Virosource "block/partitions/Kconfig"
1979be96f3fSAl Viro
19899874d50SJens Axboeconfig BLOCK_COMPAT
199c50fca55SMasahiro Yamada	def_bool COMPAT
20099874d50SJens Axboe
2018ec2ef2bSStephen Rothwellconfig BLK_MQ_PCI
202c50fca55SMasahiro Yamada	def_bool PCI
2038ec2ef2bSStephen Rothwell
20473473427SChristoph Hellwigconfig BLK_MQ_VIRTIO
20573473427SChristoph Hellwig	bool
206c50fca55SMasahiro Yamada	depends on VIRTIO
20773473427SChristoph Hellwig	default y
20873473427SChristoph Hellwig
20924c5dc66SSagi Grimbergconfig BLK_MQ_RDMA
21024c5dc66SSagi Grimberg	bool
211c50fca55SMasahiro Yamada	depends on INFINIBAND
21224c5dc66SSagi Grimberg	default y
21324c5dc66SSagi Grimberg
214bca6b067SBart Van Asscheconfig BLK_PM
215c50fca55SMasahiro Yamada	def_bool PM
216bca6b067SBart Van Assche
217c66fd019SChristoph Hellwig# do not use in new code
218c66fd019SChristoph Hellwigconfig BLOCK_HOLDER_DEPRECATED
219c66fd019SChristoph Hellwig	bool
220c66fd019SChristoph Hellwig
2218636a1f9SMasahiro Yamadasource "block/Kconfig.iosched"
222c50fca55SMasahiro Yamada
223c50fca55SMasahiro Yamadaendif # BLOCK
224