xref: /kernel/linux/linux-6.6/block/Kconfig (revision 62306a36)
162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci#
362306a36Sopenharmony_ci# Block layer core configuration
462306a36Sopenharmony_ci#
562306a36Sopenharmony_cimenuconfig BLOCK
662306a36Sopenharmony_ci       bool "Enable the block layer" if EXPERT
762306a36Sopenharmony_ci       default y
862306a36Sopenharmony_ci       select FS_IOMAP
962306a36Sopenharmony_ci       select SBITMAP
1062306a36Sopenharmony_ci       help
1162306a36Sopenharmony_ci	 Provide block layer support for the kernel.
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci	 Disable this option to remove the block layer support from the
1462306a36Sopenharmony_ci	 kernel. This may be useful for embedded devices.
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci	 If this option is disabled:
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci	   - block device files will become unusable
1962306a36Sopenharmony_ci	   - some filesystems (such as ext3) will become unavailable.
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci	 Also, SCSI character devices and USB storage will be disabled since
2262306a36Sopenharmony_ci	 they make use of various block layer definitions and facilities.
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci	 Say Y here unless you know you really don't want to mount disks and
2562306a36Sopenharmony_ci	 suchlike.
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_ciif BLOCK
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ciconfig BLOCK_LEGACY_AUTOLOAD
3062306a36Sopenharmony_ci	bool "Legacy autoloading support"
3162306a36Sopenharmony_ci	default y
3262306a36Sopenharmony_ci	help
3362306a36Sopenharmony_ci	  Enable loading modules and creating block device instances based on
3462306a36Sopenharmony_ci	  accesses through their device special file.  This is a historic Linux
3562306a36Sopenharmony_ci	  feature and makes no sense in a udev world where device files are
3662306a36Sopenharmony_ci	  created on demand, but scripts that manually create device nodes and
3762306a36Sopenharmony_ci	  then call losetup might rely on this behavior.
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ciconfig BLK_RQ_ALLOC_TIME
4062306a36Sopenharmony_ci	bool
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ciconfig BLK_CGROUP_RWSTAT
4362306a36Sopenharmony_ci	bool
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ciconfig BLK_CGROUP_PUNT_BIO
4662306a36Sopenharmony_ci	bool
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ciconfig BLK_DEV_BSG_COMMON
4962306a36Sopenharmony_ci	tristate
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ciconfig BLK_ICQ
5262306a36Sopenharmony_ci	bool
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_ciconfig BLK_DEV_BSGLIB
5562306a36Sopenharmony_ci	bool "Block layer SG support v4 helper lib"
5662306a36Sopenharmony_ci	select BLK_DEV_BSG_COMMON
5762306a36Sopenharmony_ci	help
5862306a36Sopenharmony_ci	  Subsystems will normally enable this if needed. Users will not
5962306a36Sopenharmony_ci	  normally need to manually enable this.
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci	  If unsure, say N.
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ciconfig BLK_DEV_INTEGRITY
6462306a36Sopenharmony_ci	bool "Block layer data integrity support"
6562306a36Sopenharmony_ci	help
6662306a36Sopenharmony_ci	Some storage devices allow extra information to be
6762306a36Sopenharmony_ci	stored/retrieved to help protect the data.  The block layer
6862306a36Sopenharmony_ci	data integrity option provides hooks which can be used by
6962306a36Sopenharmony_ci	filesystems to ensure better data integrity.
7062306a36Sopenharmony_ci
7162306a36Sopenharmony_ci	Say yes here if you have a storage device that provides the
7262306a36Sopenharmony_ci	T10/SCSI Data Integrity Field or the T13/ATA External Path
7362306a36Sopenharmony_ci	Protection.  If in doubt, say N.
7462306a36Sopenharmony_ci
7562306a36Sopenharmony_ciconfig BLK_DEV_INTEGRITY_T10
7662306a36Sopenharmony_ci	tristate
7762306a36Sopenharmony_ci	depends on BLK_DEV_INTEGRITY
7862306a36Sopenharmony_ci	select CRC_T10DIF
7962306a36Sopenharmony_ci	select CRC64_ROCKSOFT
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ciconfig BLK_DEV_ZONED
8262306a36Sopenharmony_ci	bool "Zoned block device support"
8362306a36Sopenharmony_ci	select MQ_IOSCHED_DEADLINE
8462306a36Sopenharmony_ci	help
8562306a36Sopenharmony_ci	Block layer zoned block device support. This option enables
8662306a36Sopenharmony_ci	support for ZAC/ZBC/ZNS host-managed and host-aware zoned block
8762306a36Sopenharmony_ci	devices.
8862306a36Sopenharmony_ci
8962306a36Sopenharmony_ci	Say yes here if you have a ZAC, ZBC, or ZNS storage device.
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ciconfig BLK_DEV_THROTTLING
9262306a36Sopenharmony_ci	bool "Block layer bio throttling support"
9362306a36Sopenharmony_ci	depends on BLK_CGROUP
9462306a36Sopenharmony_ci	select BLK_CGROUP_RWSTAT
9562306a36Sopenharmony_ci	help
9662306a36Sopenharmony_ci	Block layer bio throttling support. It can be used to limit
9762306a36Sopenharmony_ci	the IO rate to a device. IO rate policies are per cgroup and
9862306a36Sopenharmony_ci	one needs to mount and use blkio cgroup controller for creating
9962306a36Sopenharmony_ci	cgroups and specifying per device IO rate policies.
10062306a36Sopenharmony_ci
10162306a36Sopenharmony_ci	See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information.
10262306a36Sopenharmony_ci
10362306a36Sopenharmony_ciconfig BLK_DEV_THROTTLING_LOW
10462306a36Sopenharmony_ci	bool "Block throttling .low limit interface support (EXPERIMENTAL)"
10562306a36Sopenharmony_ci	depends on BLK_DEV_THROTTLING
10662306a36Sopenharmony_ci	help
10762306a36Sopenharmony_ci	Add .low limit interface for block throttling. The low limit is a best
10862306a36Sopenharmony_ci	effort limit to prioritize cgroups. Depending on the setting, the limit
10962306a36Sopenharmony_ci	can be used to protect cgroups in terms of bandwidth/iops and better
11062306a36Sopenharmony_ci	utilize disk resource.
11162306a36Sopenharmony_ci
11262306a36Sopenharmony_ci	Note, this is an experimental interface and could be changed someday.
11362306a36Sopenharmony_ci
11462306a36Sopenharmony_ciconfig BLK_WBT
11562306a36Sopenharmony_ci	bool "Enable support for block device writeback throttling"
11662306a36Sopenharmony_ci	help
11762306a36Sopenharmony_ci	Enabling this option enables the block layer to throttle buffered
11862306a36Sopenharmony_ci	background writeback from the VM, making it more smooth and having
11962306a36Sopenharmony_ci	less impact on foreground operations. The throttling is done
12062306a36Sopenharmony_ci	dynamically on an algorithm loosely based on CoDel, factoring in
12162306a36Sopenharmony_ci	the realtime performance of the disk.
12262306a36Sopenharmony_ci
12362306a36Sopenharmony_ciconfig BLK_WBT_MQ
12462306a36Sopenharmony_ci	bool "Enable writeback throttling by default"
12562306a36Sopenharmony_ci	default y
12662306a36Sopenharmony_ci	depends on BLK_WBT
12762306a36Sopenharmony_ci	help
12862306a36Sopenharmony_ci	Enable writeback throttling by default for request-based block devices.
12962306a36Sopenharmony_ci
13062306a36Sopenharmony_ciconfig BLK_CGROUP_IOLATENCY
13162306a36Sopenharmony_ci	bool "Enable support for latency based cgroup IO protection"
13262306a36Sopenharmony_ci	depends on BLK_CGROUP
13362306a36Sopenharmony_ci	help
13462306a36Sopenharmony_ci	Enabling this option enables the .latency interface for IO throttling.
13562306a36Sopenharmony_ci	The IO controller will attempt to maintain average IO latencies below
13662306a36Sopenharmony_ci	the configured latency target, throttling anybody with a higher latency
13762306a36Sopenharmony_ci	target than the victimized group.
13862306a36Sopenharmony_ci
13962306a36Sopenharmony_ci	Note, this is an experimental interface and could be changed someday.
14062306a36Sopenharmony_ci
14162306a36Sopenharmony_ciconfig BLK_CGROUP_FC_APPID
14262306a36Sopenharmony_ci	bool "Enable support to track FC I/O Traffic across cgroup applications"
14362306a36Sopenharmony_ci	depends on BLK_CGROUP && NVME_FC
14462306a36Sopenharmony_ci	help
14562306a36Sopenharmony_ci	  Enabling this option enables the support to track FC I/O traffic across
14662306a36Sopenharmony_ci	  cgroup applications. It enables the Fabric and the storage targets to
14762306a36Sopenharmony_ci	  identify, monitor, and handle FC traffic based on VM tags by inserting
14862306a36Sopenharmony_ci	  application specific identification into the FC frame.
14962306a36Sopenharmony_ci
15062306a36Sopenharmony_ciconfig BLK_CGROUP_IOCOST
15162306a36Sopenharmony_ci	bool "Enable support for cost model based cgroup IO controller"
15262306a36Sopenharmony_ci	depends on BLK_CGROUP
15362306a36Sopenharmony_ci	select BLK_RQ_ALLOC_TIME
15462306a36Sopenharmony_ci	help
15562306a36Sopenharmony_ci	Enabling this option enables the .weight interface for cost
15662306a36Sopenharmony_ci	model based proportional IO control.  The IO controller
15762306a36Sopenharmony_ci	distributes IO capacity between different groups based on
15862306a36Sopenharmony_ci	their share of the overall weight distribution.
15962306a36Sopenharmony_ci
16062306a36Sopenharmony_ciconfig BLK_CGROUP_IOPRIO
16162306a36Sopenharmony_ci	bool "Cgroup I/O controller for assigning an I/O priority class"
16262306a36Sopenharmony_ci	depends on BLK_CGROUP
16362306a36Sopenharmony_ci	help
16462306a36Sopenharmony_ci	Enable the .prio interface for assigning an I/O priority class to
16562306a36Sopenharmony_ci	requests. The I/O priority class affects the order in which an I/O
16662306a36Sopenharmony_ci	scheduler and block devices process requests. Only some I/O schedulers
16762306a36Sopenharmony_ci	and some block devices support I/O priorities.
16862306a36Sopenharmony_ci
16962306a36Sopenharmony_ciconfig BLK_DEBUG_FS
17062306a36Sopenharmony_ci	bool "Block layer debugging information in debugfs"
17162306a36Sopenharmony_ci	default y
17262306a36Sopenharmony_ci	depends on DEBUG_FS
17362306a36Sopenharmony_ci	help
17462306a36Sopenharmony_ci	Include block layer debugging information in debugfs. This information
17562306a36Sopenharmony_ci	is mostly useful for kernel developers, but it doesn't incur any cost
17662306a36Sopenharmony_ci	at runtime.
17762306a36Sopenharmony_ci
17862306a36Sopenharmony_ci	Unless you are building a kernel for a tiny system, you should
17962306a36Sopenharmony_ci	say Y here.
18062306a36Sopenharmony_ci
18162306a36Sopenharmony_ciconfig BLK_DEBUG_FS_ZONED
18262306a36Sopenharmony_ci       bool
18362306a36Sopenharmony_ci       default BLK_DEBUG_FS && BLK_DEV_ZONED
18462306a36Sopenharmony_ci
18562306a36Sopenharmony_ciconfig BLK_SED_OPAL
18662306a36Sopenharmony_ci	bool "Logic for interfacing with Opal enabled SEDs"
18762306a36Sopenharmony_ci	depends on KEYS
18862306a36Sopenharmony_ci	select PSERIES_PLPKS if PPC_PSERIES
18962306a36Sopenharmony_ci	help
19062306a36Sopenharmony_ci	Builds Logic for interfacing with Opal enabled controllers.
19162306a36Sopenharmony_ci	Enabling this option enables users to setup/unlock/lock
19262306a36Sopenharmony_ci	Locking ranges for SED devices using the Opal protocol.
19362306a36Sopenharmony_ci
19462306a36Sopenharmony_ciconfig BLK_INLINE_ENCRYPTION
19562306a36Sopenharmony_ci	bool "Enable inline encryption support in block layer"
19662306a36Sopenharmony_ci	help
19762306a36Sopenharmony_ci	  Build the blk-crypto subsystem. Enabling this lets the
19862306a36Sopenharmony_ci	  block layer handle encryption, so users can take
19962306a36Sopenharmony_ci	  advantage of inline encryption hardware if present.
20062306a36Sopenharmony_ci
20162306a36Sopenharmony_ciconfig BLK_INLINE_ENCRYPTION_FALLBACK
20262306a36Sopenharmony_ci	bool "Enable crypto API fallback for blk-crypto"
20362306a36Sopenharmony_ci	depends on BLK_INLINE_ENCRYPTION
20462306a36Sopenharmony_ci	select CRYPTO
20562306a36Sopenharmony_ci	select CRYPTO_SKCIPHER
20662306a36Sopenharmony_ci	help
20762306a36Sopenharmony_ci	  Enabling this lets the block layer handle inline encryption
20862306a36Sopenharmony_ci	  by falling back to the kernel crypto API when inline
20962306a36Sopenharmony_ci	  encryption hardware is not present.
21062306a36Sopenharmony_ci
21162306a36Sopenharmony_cisource "block/partitions/Kconfig"
21262306a36Sopenharmony_ci
21362306a36Sopenharmony_ciconfig BLK_MQ_PCI
21462306a36Sopenharmony_ci	def_bool PCI
21562306a36Sopenharmony_ci
21662306a36Sopenharmony_ciconfig BLK_MQ_VIRTIO
21762306a36Sopenharmony_ci	bool
21862306a36Sopenharmony_ci	depends on VIRTIO
21962306a36Sopenharmony_ci	default y
22062306a36Sopenharmony_ci
22162306a36Sopenharmony_ciconfig BLK_PM
22262306a36Sopenharmony_ci	def_bool PM
22362306a36Sopenharmony_ci
22462306a36Sopenharmony_ci# do not use in new code
22562306a36Sopenharmony_ciconfig BLOCK_HOLDER_DEPRECATED
22662306a36Sopenharmony_ci	bool
22762306a36Sopenharmony_ci
22862306a36Sopenharmony_ciconfig BLK_MQ_STACKING
22962306a36Sopenharmony_ci	bool
23062306a36Sopenharmony_ci
23162306a36Sopenharmony_cisource "block/Kconfig.iosched"
23262306a36Sopenharmony_ci
23362306a36Sopenharmony_ciendif # BLOCK
234