xref: /linux/block/Kconfig (revision 8636a1f9677db4f883f29a072f401303acfc2edd)
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
2990c699a9SBartlomiej Zolnierkiewiczconfig LBDAF
3090c699a9SBartlomiej Zolnierkiewicz	bool "Support for large (2TB+) block devices and files"
31e6243863SMatthew Wilcox	depends on !64BIT
32db29a6b4SBartlomiej Zolnierkiewicz	default y
333a65dfe8SJens Axboe	help
34b3a6ffe1SJens Axboe	  Enable block devices or files of size 2TB and larger.
35ee86418dSNick Andrew
36ee86418dSNick Andrew	  This option is required to support the full capacity of large
37ee86418dSNick Andrew	  (2TB+) block devices, including RAID, disk, Network Block Device,
38ee86418dSNick Andrew	  Logical Volume Manager (LVM) and loopback.
39ee86418dSNick Andrew
40b3a6ffe1SJens Axboe	  This option also enables support for single files larger than
41b3a6ffe1SJens Axboe	  2TB.
42ee86418dSNick Andrew
434d783b09STheodore Ts'o	  The ext4 filesystem requires that this feature be enabled in
444d783b09STheodore Ts'o	  order to support filesystems that have the huge_file feature
45db29a6b4SBartlomiej Zolnierkiewicz	  enabled.  Otherwise, it will refuse to mount in the read-write
46db29a6b4SBartlomiej Zolnierkiewicz	  mode any filesystems that use the huge_file feature, which is
47db29a6b4SBartlomiej Zolnierkiewicz	  enabled by default by mke2fs.ext4.
484d783b09STheodore Ts'o
49db29a6b4SBartlomiej Zolnierkiewicz	  The GFS2 filesystem also requires this feature.
50db29a6b4SBartlomiej Zolnierkiewicz
51db29a6b4SBartlomiej Zolnierkiewicz	  If unsure, say Y.
523a65dfe8SJens Axboe
5372148aecSChristoph Hellwigconfig BLK_SCSI_REQUEST
5472148aecSChristoph Hellwig	bool
5572148aecSChristoph Hellwig
563d6392cfSJens Axboeconfig BLK_DEV_BSG
5714d9fa35SJohn Stoffel	bool "Block layer SG support v4"
5814d9fa35SJohn Stoffel	default y
5972148aecSChristoph Hellwig	select BLK_SCSI_REQUEST
6014d9fa35SJohn Stoffel	help
61319a7b7fSFUJITA Tomonori	  Saying Y here will enable generic SG (SCSI generic) v4 support
62319a7b7fSFUJITA Tomonori	  for any block device.
63319a7b7fSFUJITA Tomonori
64319a7b7fSFUJITA Tomonori	  Unlike SG v3 (aka block/scsi_ioctl.c drivers/scsi/sg.c), SG v4
65319a7b7fSFUJITA Tomonori	  can handle complicated SCSI commands: tagged variable length cdbs
66319a7b7fSFUJITA Tomonori	  with bidirectional data transfers and generic request/response
67319a7b7fSFUJITA Tomonori	  protocols (e.g. Task Management Functions and SMP in Serial
68319a7b7fSFUJITA Tomonori	  Attached SCSI).
693d6392cfSJens Axboe
7014d9fa35SJohn Stoffel	  This option is required by recent UDEV versions to properly
7114d9fa35SJohn Stoffel	  access device serial numbers, etc.
7214d9fa35SJohn Stoffel
7314d9fa35SJohn Stoffel	  If unsure, say Y.
74ee86418dSNick Andrew
75aa387cc8SMike Christieconfig BLK_DEV_BSGLIB
76aa387cc8SMike Christie	bool "Block layer SG support v4 helper lib"
77aa387cc8SMike Christie	select BLK_DEV_BSG
7872148aecSChristoph Hellwig	select BLK_SCSI_REQUEST
79aa387cc8SMike Christie	help
80aa387cc8SMike Christie	  Subsystems will normally enable this if needed. Users will not
81aa387cc8SMike Christie	  normally need to manually enable this.
82aa387cc8SMike Christie
83aa387cc8SMike Christie	  If unsure, say N.
84aa387cc8SMike Christie
857ba1ba12SMartin K. Petersenconfig BLK_DEV_INTEGRITY
867ba1ba12SMartin K. Petersen	bool "Block layer data integrity support"
872341c2f8SMartin K. Petersen	select CRC_T10DIF if BLK_DEV_INTEGRITY
887ba1ba12SMartin K. Petersen	---help---
897ba1ba12SMartin K. Petersen	Some storage devices allow extra information to be
907ba1ba12SMartin K. Petersen	stored/retrieved to help protect the data.  The block layer
917ba1ba12SMartin K. Petersen	data integrity option provides hooks which can be used by
927ba1ba12SMartin K. Petersen	filesystems to ensure better data integrity.
937ba1ba12SMartin K. Petersen
947ba1ba12SMartin K. Petersen	Say yes here if you have a storage device that provides the
957ba1ba12SMartin K. Petersen	T10/SCSI Data Integrity Field or the T13/ATA External Path
967ba1ba12SMartin K. Petersen	Protection.  If in doubt, say N.
977ba1ba12SMartin K. Petersen
986a0cb1bcSHannes Reineckeconfig BLK_DEV_ZONED
996a0cb1bcSHannes Reinecke	bool "Zoned block device support"
1006a0cb1bcSHannes Reinecke	---help---
1016a0cb1bcSHannes Reinecke	Block layer zoned block device support. This option enables
1026a0cb1bcSHannes Reinecke	support for ZAC/ZBC host-managed and host-aware zoned block devices.
1036a0cb1bcSHannes Reinecke
1046a0cb1bcSHannes Reinecke	Say yes here if you have a ZAC or ZBC storage device.
1056a0cb1bcSHannes Reinecke
106e43473b7SVivek Goyalconfig BLK_DEV_THROTTLING
107e43473b7SVivek Goyal	bool "Block layer bio throttling support"
1088e42e0a2SKees Cook	depends on BLK_CGROUP=y
109e43473b7SVivek Goyal	---help---
110e43473b7SVivek Goyal	Block layer bio throttling support. It can be used to limit
111e43473b7SVivek Goyal	the IO rate to a device. IO rate policies are per cgroup and
112e43473b7SVivek Goyal	one needs to mount and use blkio cgroup controller for creating
113e43473b7SVivek Goyal	cgroups and specifying per device IO rate policies.
114e43473b7SVivek Goyal
1155fb94e9cSMauro Carvalho Chehab	See Documentation/cgroup-v1/blkio-controller.txt for more information.
116e43473b7SVivek Goyal
117327ffb9bSShaohua Liconfig BLK_DEV_THROTTLING_LOW
118327ffb9bSShaohua Li	bool "Block throttling .low limit interface support (EXPERIMENTAL)"
119327ffb9bSShaohua Li	depends on BLK_DEV_THROTTLING
120327ffb9bSShaohua Li	---help---
121327ffb9bSShaohua Li	Add .low limit interface for block throttling. The low limit is a best
122327ffb9bSShaohua Li	effort limit to prioritize cgroups. Depending on the setting, the limit
123327ffb9bSShaohua Li	can be used to protect cgroups in terms of bandwidth/iops and better
124327ffb9bSShaohua Li	utilize disk resource.
125327ffb9bSShaohua Li
126327ffb9bSShaohua Li	Note, this is an experimental interface and could be changed someday.
127327ffb9bSShaohua Li
128080506adSPaul Gortmakerconfig BLK_CMDLINE_PARSER
129bab55417SCai Zhiyong	bool "Block device command line partition parser"
130bab55417SCai Zhiyong	---help---
131080506adSPaul Gortmaker	Enabling this option allows you to specify the partition layout from
132080506adSPaul Gortmaker	the kernel boot args.  This is typically of use for embedded devices
133080506adSPaul Gortmaker	which don't otherwise have any standardized method for listing the
134080506adSPaul Gortmaker	partitions on a block device.
135080506adSPaul Gortmaker
136080506adSPaul Gortmaker	See Documentation/block/cmdline-partition.txt for more information.
137bab55417SCai Zhiyong
13887760e5eSJens Axboeconfig BLK_WBT
13987760e5eSJens Axboe	bool "Enable support for block device writeback throttling"
14087760e5eSJens Axboe	---help---
14187760e5eSJens Axboe	Enabling this option enables the block layer to throttle buffered
14287760e5eSJens Axboe	background writeback from the VM, making it more smooth and having
14387760e5eSJens Axboe	less impact on foreground operations. The throttling is done
14487760e5eSJens Axboe	dynamically on an algorithm loosely based on CoDel, factoring in
14587760e5eSJens Axboe	the realtime performance of the disk.
14687760e5eSJens Axboe
147d7067512SJosef Bacikconfig BLK_CGROUP_IOLATENCY
148d7067512SJosef Bacik	bool "Enable support for latency based cgroup IO protection"
149d7067512SJosef Bacik	depends on BLK_CGROUP=y
150d7067512SJosef Bacik	---help---
151d7067512SJosef Bacik	Enabling this option enables the .latency interface for IO throttling.
152d7067512SJosef Bacik	The IO controller will attempt to maintain average IO latencies below
153d7067512SJosef Bacik	the configured latency target, throttling anybody with a higher latency
154d7067512SJosef Bacik	target than the victimized group.
155d7067512SJosef Bacik
156d7067512SJosef Bacik	Note, this is an experimental interface and could be changed someday.
157d7067512SJosef Bacik
15887760e5eSJens Axboeconfig BLK_WBT_SQ
15987760e5eSJens Axboe	bool "Single queue writeback throttling"
16087760e5eSJens Axboe	depends on BLK_WBT
16187760e5eSJens Axboe	---help---
16287760e5eSJens Axboe	Enable writeback throttling by default on legacy single queue devices
16387760e5eSJens Axboe
16487760e5eSJens Axboeconfig BLK_WBT_MQ
16587760e5eSJens Axboe	bool "Multiqueue writeback throttling"
16687760e5eSJens Axboe	default y
16787760e5eSJens Axboe	depends on BLK_WBT
16887760e5eSJens Axboe	---help---
16987760e5eSJens Axboe	Enable writeback throttling by default on multiqueue devices.
17087760e5eSJens Axboe	Multiqueue currently doesn't have support for IO scheduling,
17187760e5eSJens Axboe	enabling this option is recommended.
17287760e5eSJens Axboe
173400f73b2SOmar Sandovalconfig BLK_DEBUG_FS
174400f73b2SOmar Sandoval	bool "Block layer debugging information in debugfs"
175400f73b2SOmar Sandoval	default y
176400f73b2SOmar Sandoval	depends on DEBUG_FS
177400f73b2SOmar Sandoval	---help---
178400f73b2SOmar Sandoval	Include block layer debugging information in debugfs. This information
179400f73b2SOmar Sandoval	is mostly useful for kernel developers, but it doesn't incur any cost
180400f73b2SOmar Sandoval	at runtime.
181400f73b2SOmar Sandoval
182400f73b2SOmar Sandoval	Unless you are building a kernel for a tiny system, you should
183400f73b2SOmar Sandoval	say Y here.
184400f73b2SOmar Sandoval
1856a5ac984SBart Van Asscheconfig BLK_DEBUG_FS_ZONED
1866a5ac984SBart Van Assche       bool
1876a5ac984SBart Van Assche       default BLK_DEBUG_FS && BLK_DEV_ZONED
1886a5ac984SBart Van Assche
189455a7b23SScott Bauerconfig BLK_SED_OPAL
190455a7b23SScott Bauer	bool "Logic for interfacing with Opal enabled SEDs"
191455a7b23SScott Bauer	---help---
192455a7b23SScott Bauer	Builds Logic for interfacing with Opal enabled controllers.
193455a7b23SScott Bauer	Enabling this option enables users to setup/unlock/lock
194455a7b23SScott Bauer	Locking ranges for SED devices using the Opal protocol.
195455a7b23SScott Bauer
1969be96f3fSAl Viromenu "Partition Types"
1979be96f3fSAl Viro
1989be96f3fSAl Virosource "block/partitions/Kconfig"
1999be96f3fSAl Viro
2009be96f3fSAl Viroendmenu
2019be96f3fSAl Viro
2022b9e0aaeSLinus Torvaldsendif # BLOCK
2032b9e0aaeSLinus Torvalds
20499874d50SJens Axboeconfig BLOCK_COMPAT
20599874d50SJens Axboe	bool
2062b9e0aaeSLinus Torvalds	depends on BLOCK && COMPAT
20799874d50SJens Axboe	default y
20899874d50SJens Axboe
2098ec2ef2bSStephen Rothwellconfig BLK_MQ_PCI
2108ec2ef2bSStephen Rothwell	bool
2118ec2ef2bSStephen Rothwell	depends on BLOCK && PCI
2128ec2ef2bSStephen Rothwell	default y
2138ec2ef2bSStephen Rothwell
21473473427SChristoph Hellwigconfig BLK_MQ_VIRTIO
21573473427SChristoph Hellwig	bool
21673473427SChristoph Hellwig	depends on BLOCK && VIRTIO
21773473427SChristoph Hellwig	default y
21873473427SChristoph Hellwig
21924c5dc66SSagi Grimbergconfig BLK_MQ_RDMA
22024c5dc66SSagi Grimberg	bool
22124c5dc66SSagi Grimberg	depends on BLOCK && INFINIBAND
22224c5dc66SSagi Grimberg	default y
22324c5dc66SSagi Grimberg
224bca6b067SBart Van Asscheconfig BLK_PM
225bca6b067SBart Van Assche	def_bool BLOCK && PM
226bca6b067SBart Van Assche
227*8636a1f9SMasahiro Yamadasource "block/Kconfig.iosched"
228