xref: /linux/block/Kconfig (revision 99c8b231ae6c6ca4ca2fd1c0b3701071f589661f)
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
2972148aecSChristoph Hellwigconfig BLK_SCSI_REQUEST
3072148aecSChristoph Hellwig	bool
3172148aecSChristoph Hellwig
323d6392cfSJens Axboeconfig BLK_DEV_BSG
3314d9fa35SJohn Stoffel	bool "Block layer SG support v4"
3414d9fa35SJohn Stoffel	default y
3572148aecSChristoph Hellwig	select BLK_SCSI_REQUEST
3614d9fa35SJohn Stoffel	help
37319a7b7fSFUJITA Tomonori	  Saying Y here will enable generic SG (SCSI generic) v4 support
38319a7b7fSFUJITA Tomonori	  for any block device.
39319a7b7fSFUJITA Tomonori
40319a7b7fSFUJITA Tomonori	  Unlike SG v3 (aka block/scsi_ioctl.c drivers/scsi/sg.c), SG v4
41319a7b7fSFUJITA Tomonori	  can handle complicated SCSI commands: tagged variable length cdbs
42319a7b7fSFUJITA Tomonori	  with bidirectional data transfers and generic request/response
43319a7b7fSFUJITA Tomonori	  protocols (e.g. Task Management Functions and SMP in Serial
44319a7b7fSFUJITA Tomonori	  Attached SCSI).
453d6392cfSJens Axboe
4614d9fa35SJohn Stoffel	  This option is required by recent UDEV versions to properly
4714d9fa35SJohn Stoffel	  access device serial numbers, etc.
4814d9fa35SJohn Stoffel
4914d9fa35SJohn Stoffel	  If unsure, say Y.
50ee86418dSNick Andrew
51aa387cc8SMike Christieconfig BLK_DEV_BSGLIB
52aa387cc8SMike Christie	bool "Block layer SG support v4 helper lib"
53aa387cc8SMike Christie	select BLK_DEV_BSG
5472148aecSChristoph Hellwig	select BLK_SCSI_REQUEST
55aa387cc8SMike Christie	help
56aa387cc8SMike Christie	  Subsystems will normally enable this if needed. Users will not
57aa387cc8SMike Christie	  normally need to manually enable this.
58aa387cc8SMike Christie
59aa387cc8SMike Christie	  If unsure, say N.
60aa387cc8SMike Christie
617ba1ba12SMartin K. Petersenconfig BLK_DEV_INTEGRITY
627ba1ba12SMartin K. Petersen	bool "Block layer data integrity support"
632341c2f8SMartin K. Petersen	select CRC_T10DIF if BLK_DEV_INTEGRITY
647ba1ba12SMartin K. Petersen	---help---
657ba1ba12SMartin K. Petersen	Some storage devices allow extra information to be
667ba1ba12SMartin K. Petersen	stored/retrieved to help protect the data.  The block layer
677ba1ba12SMartin K. Petersen	data integrity option provides hooks which can be used by
687ba1ba12SMartin K. Petersen	filesystems to ensure better data integrity.
697ba1ba12SMartin K. Petersen
707ba1ba12SMartin K. Petersen	Say yes here if you have a storage device that provides the
717ba1ba12SMartin K. Petersen	T10/SCSI Data Integrity Field or the T13/ATA External Path
727ba1ba12SMartin K. Petersen	Protection.  If in doubt, say N.
737ba1ba12SMartin K. Petersen
746a0cb1bcSHannes Reineckeconfig BLK_DEV_ZONED
756a0cb1bcSHannes Reinecke	bool "Zoned block device support"
766a0cb1bcSHannes Reinecke	---help---
776a0cb1bcSHannes Reinecke	Block layer zoned block device support. This option enables
786a0cb1bcSHannes Reinecke	support for ZAC/ZBC host-managed and host-aware zoned block devices.
796a0cb1bcSHannes Reinecke
806a0cb1bcSHannes Reinecke	Say yes here if you have a ZAC or ZBC storage device.
816a0cb1bcSHannes Reinecke
82e43473b7SVivek Goyalconfig BLK_DEV_THROTTLING
83e43473b7SVivek Goyal	bool "Block layer bio throttling support"
848e42e0a2SKees Cook	depends on BLK_CGROUP=y
85e43473b7SVivek Goyal	---help---
86e43473b7SVivek Goyal	Block layer bio throttling support. It can be used to limit
87e43473b7SVivek Goyal	the IO rate to a device. IO rate policies are per cgroup and
88e43473b7SVivek Goyal	one needs to mount and use blkio cgroup controller for creating
89e43473b7SVivek Goyal	cgroups and specifying per device IO rate policies.
90e43473b7SVivek Goyal
91*99c8b231SMauro Carvalho Chehab	See Documentation/cgroup-v1/blkio-controller.rst for more information.
92e43473b7SVivek Goyal
93327ffb9bSShaohua Liconfig BLK_DEV_THROTTLING_LOW
94327ffb9bSShaohua Li	bool "Block throttling .low limit interface support (EXPERIMENTAL)"
95327ffb9bSShaohua Li	depends on BLK_DEV_THROTTLING
96327ffb9bSShaohua Li	---help---
97327ffb9bSShaohua Li	Add .low limit interface for block throttling. The low limit is a best
98327ffb9bSShaohua Li	effort limit to prioritize cgroups. Depending on the setting, the limit
99327ffb9bSShaohua Li	can be used to protect cgroups in terms of bandwidth/iops and better
100327ffb9bSShaohua Li	utilize disk resource.
101327ffb9bSShaohua Li
102327ffb9bSShaohua Li	Note, this is an experimental interface and could be changed someday.
103327ffb9bSShaohua Li
104080506adSPaul Gortmakerconfig BLK_CMDLINE_PARSER
105bab55417SCai Zhiyong	bool "Block device command line partition parser"
106bab55417SCai Zhiyong	---help---
107080506adSPaul Gortmaker	Enabling this option allows you to specify the partition layout from
108080506adSPaul Gortmaker	the kernel boot args.  This is typically of use for embedded devices
109080506adSPaul Gortmaker	which don't otherwise have any standardized method for listing the
110080506adSPaul Gortmaker	partitions on a block device.
111080506adSPaul Gortmaker
112080506adSPaul Gortmaker	See Documentation/block/cmdline-partition.txt for more information.
113bab55417SCai Zhiyong
11487760e5eSJens Axboeconfig BLK_WBT
11587760e5eSJens Axboe	bool "Enable support for block device writeback throttling"
11687760e5eSJens Axboe	---help---
11787760e5eSJens Axboe	Enabling this option enables the block layer to throttle buffered
11887760e5eSJens Axboe	background writeback from the VM, making it more smooth and having
11987760e5eSJens Axboe	less impact on foreground operations. The throttling is done
12087760e5eSJens Axboe	dynamically on an algorithm loosely based on CoDel, factoring in
12187760e5eSJens Axboe	the realtime performance of the disk.
12287760e5eSJens Axboe
123d7067512SJosef Bacikconfig BLK_CGROUP_IOLATENCY
124d7067512SJosef Bacik	bool "Enable support for latency based cgroup IO protection"
125d7067512SJosef Bacik	depends on BLK_CGROUP=y
126d7067512SJosef Bacik	---help---
127d7067512SJosef Bacik	Enabling this option enables the .latency interface for IO throttling.
128d7067512SJosef Bacik	The IO controller will attempt to maintain average IO latencies below
129d7067512SJosef Bacik	the configured latency target, throttling anybody with a higher latency
130d7067512SJosef Bacik	target than the victimized group.
131d7067512SJosef Bacik
132d7067512SJosef Bacik	Note, this is an experimental interface and could be changed someday.
133d7067512SJosef Bacik
13487760e5eSJens Axboeconfig BLK_WBT_MQ
13587760e5eSJens Axboe	bool "Multiqueue writeback throttling"
13687760e5eSJens Axboe	default y
13787760e5eSJens Axboe	depends on BLK_WBT
13887760e5eSJens Axboe	---help---
13987760e5eSJens Axboe	Enable writeback throttling by default on multiqueue devices.
14087760e5eSJens Axboe	Multiqueue currently doesn't have support for IO scheduling,
14187760e5eSJens Axboe	enabling this option is recommended.
14287760e5eSJens Axboe
143400f73b2SOmar Sandovalconfig BLK_DEBUG_FS
144400f73b2SOmar Sandoval	bool "Block layer debugging information in debugfs"
145400f73b2SOmar Sandoval	default y
146400f73b2SOmar Sandoval	depends on DEBUG_FS
147400f73b2SOmar Sandoval	---help---
148400f73b2SOmar Sandoval	Include block layer debugging information in debugfs. This information
149400f73b2SOmar Sandoval	is mostly useful for kernel developers, but it doesn't incur any cost
150400f73b2SOmar Sandoval	at runtime.
151400f73b2SOmar Sandoval
152400f73b2SOmar Sandoval	Unless you are building a kernel for a tiny system, you should
153400f73b2SOmar Sandoval	say Y here.
154400f73b2SOmar Sandoval
1556a5ac984SBart Van Asscheconfig BLK_DEBUG_FS_ZONED
1566a5ac984SBart Van Assche       bool
1576a5ac984SBart Van Assche       default BLK_DEBUG_FS && BLK_DEV_ZONED
1586a5ac984SBart Van Assche
159455a7b23SScott Bauerconfig BLK_SED_OPAL
160455a7b23SScott Bauer	bool "Logic for interfacing with Opal enabled SEDs"
161455a7b23SScott Bauer	---help---
162455a7b23SScott Bauer	Builds Logic for interfacing with Opal enabled controllers.
163455a7b23SScott Bauer	Enabling this option enables users to setup/unlock/lock
164455a7b23SScott Bauer	Locking ranges for SED devices using the Opal protocol.
165455a7b23SScott Bauer
1669be96f3fSAl Viromenu "Partition Types"
1679be96f3fSAl Viro
1689be96f3fSAl Virosource "block/partitions/Kconfig"
1699be96f3fSAl Viro
1709be96f3fSAl Viroendmenu
1719be96f3fSAl Viro
1722b9e0aaeSLinus Torvaldsendif # BLOCK
1732b9e0aaeSLinus Torvalds
17499874d50SJens Axboeconfig BLOCK_COMPAT
17599874d50SJens Axboe	bool
1762b9e0aaeSLinus Torvalds	depends on BLOCK && COMPAT
17799874d50SJens Axboe	default y
17899874d50SJens Axboe
1798ec2ef2bSStephen Rothwellconfig BLK_MQ_PCI
1808ec2ef2bSStephen Rothwell	bool
1818ec2ef2bSStephen Rothwell	depends on BLOCK && PCI
1828ec2ef2bSStephen Rothwell	default y
1838ec2ef2bSStephen Rothwell
18473473427SChristoph Hellwigconfig BLK_MQ_VIRTIO
18573473427SChristoph Hellwig	bool
18673473427SChristoph Hellwig	depends on BLOCK && VIRTIO
18773473427SChristoph Hellwig	default y
18873473427SChristoph Hellwig
18924c5dc66SSagi Grimbergconfig BLK_MQ_RDMA
19024c5dc66SSagi Grimberg	bool
19124c5dc66SSagi Grimberg	depends on BLOCK && INFINIBAND
19224c5dc66SSagi Grimberg	default y
19324c5dc66SSagi Grimberg
194bca6b067SBart Van Asscheconfig BLK_PM
195bca6b067SBart Van Assche	def_bool BLOCK && PM
196bca6b067SBart Van Assche
1978636a1f9SMasahiro Yamadasource "block/Kconfig.iosched"
198