xref: /linux/Documentation/ABI/stable/sysfs-block (revision fd0ad5e9d158436b4a9b34c60582488585e1d90d)
107c9093cSEric BiggersWhat:		/sys/block/<disk>/alignment_offset
207c9093cSEric BiggersDate:		April 2009
307c9093cSEric BiggersContact:	Martin K. Petersen <martin.petersen@oracle.com>
407c9093cSEric BiggersDescription:
507c9093cSEric Biggers		Storage devices may report a physical block size that is
607c9093cSEric Biggers		bigger than the logical block size (for instance a drive
707c9093cSEric Biggers		with 4KB physical sectors exposing 512-byte logical
807c9093cSEric Biggers		blocks to the operating system).  This parameter
907c9093cSEric Biggers		indicates how many bytes the beginning of the device is
1007c9093cSEric Biggers		offset from the disk's natural alignment.
1107c9093cSEric Biggers
1207c9093cSEric Biggers
1307c9093cSEric BiggersWhat:		/sys/block/<disk>/discard_alignment
1407c9093cSEric BiggersDate:		May 2011
1507c9093cSEric BiggersContact:	Martin K. Petersen <martin.petersen@oracle.com>
1607c9093cSEric BiggersDescription:
1707c9093cSEric Biggers		Devices that support discard functionality may
1807c9093cSEric Biggers		internally allocate space in units that are bigger than
1907c9093cSEric Biggers		the exported logical block size. The discard_alignment
2007c9093cSEric Biggers		parameter indicates how many bytes the beginning of the
2107c9093cSEric Biggers		device is offset from the internal allocation unit's
2207c9093cSEric Biggers		natural alignment.
2307c9093cSEric Biggers
249da3d1e9SJohn GarryWhat:		/sys/block/<disk>/atomic_write_max_bytes
259da3d1e9SJohn GarryDate:		February 2024
269da3d1e9SJohn GarryContact:	Himanshu Madhani <himanshu.madhani@oracle.com>
279da3d1e9SJohn GarryDescription:
289da3d1e9SJohn Garry		[RO] This parameter specifies the maximum atomic write
299da3d1e9SJohn Garry		size reported by the device. This parameter is relevant
309da3d1e9SJohn Garry		for merging of writes, where a merged atomic write
319da3d1e9SJohn Garry		operation must not exceed this number of bytes.
329da3d1e9SJohn Garry		This parameter may be greater than the value in
339da3d1e9SJohn Garry		atomic_write_unit_max_bytes as
349da3d1e9SJohn Garry		atomic_write_unit_max_bytes will be rounded down to a
359da3d1e9SJohn Garry		power-of-two and atomic_write_unit_max_bytes may also be
369da3d1e9SJohn Garry		limited by some other queue limits, such as max_segments.
379da3d1e9SJohn Garry		This parameter - along with atomic_write_unit_min_bytes
389da3d1e9SJohn Garry		and atomic_write_unit_max_bytes - will not be larger than
399da3d1e9SJohn Garry		max_hw_sectors_kb, but may be larger than max_sectors_kb.
409da3d1e9SJohn Garry
419da3d1e9SJohn Garry
429da3d1e9SJohn GarryWhat:		/sys/block/<disk>/atomic_write_unit_min_bytes
439da3d1e9SJohn GarryDate:		February 2024
449da3d1e9SJohn GarryContact:	Himanshu Madhani <himanshu.madhani@oracle.com>
459da3d1e9SJohn GarryDescription:
469da3d1e9SJohn Garry		[RO] This parameter specifies the smallest block which can
479da3d1e9SJohn Garry		be written atomically with an atomic write operation. All
489da3d1e9SJohn Garry		atomic write operations must begin at a
499da3d1e9SJohn Garry		atomic_write_unit_min boundary and must be multiples of
509da3d1e9SJohn Garry		atomic_write_unit_min. This value must be a power-of-two.
519da3d1e9SJohn Garry
529da3d1e9SJohn Garry
539da3d1e9SJohn GarryWhat:		/sys/block/<disk>/atomic_write_unit_max_bytes
549da3d1e9SJohn GarryDate:		February 2024
559da3d1e9SJohn GarryContact:	Himanshu Madhani <himanshu.madhani@oracle.com>
569da3d1e9SJohn GarryDescription:
579da3d1e9SJohn Garry		[RO] This parameter defines the largest block which can be
589da3d1e9SJohn Garry		written atomically with an atomic write operation. This
599da3d1e9SJohn Garry		value must be a multiple of atomic_write_unit_min and must
609da3d1e9SJohn Garry		be a power-of-two. This value will not be larger than
619da3d1e9SJohn Garry		atomic_write_max_bytes.
629da3d1e9SJohn Garry
639da3d1e9SJohn Garry
649da3d1e9SJohn GarryWhat:		/sys/block/<disk>/atomic_write_boundary_bytes
659da3d1e9SJohn GarryDate:		February 2024
669da3d1e9SJohn GarryContact:	Himanshu Madhani <himanshu.madhani@oracle.com>
679da3d1e9SJohn GarryDescription:
689da3d1e9SJohn Garry		[RO] A device may need to internally split an atomic write I/O
699da3d1e9SJohn Garry		which straddles a given logical block address boundary. This
709da3d1e9SJohn Garry		parameter specifies the size in bytes of the atomic boundary if
719da3d1e9SJohn Garry		one is reported by the device. This value must be a
729da3d1e9SJohn Garry		power-of-two and at least the size as in
739da3d1e9SJohn Garry		atomic_write_unit_max_bytes.
749da3d1e9SJohn Garry		Any attempt to merge atomic write I/Os must not result in a
759da3d1e9SJohn Garry		merged I/O which crosses this boundary (if any).
769da3d1e9SJohn Garry
7707c9093cSEric Biggers
7807c9093cSEric BiggersWhat:		/sys/block/<disk>/diskseq
7907c9093cSEric BiggersDate:		February 2021
80*fd0ad5e9SAhmad FatoumContact:	Matteo Croce <teknoraver@meta.com>
8107c9093cSEric BiggersDescription:
8207c9093cSEric Biggers		The /sys/block/<disk>/diskseq files reports the disk
8307c9093cSEric Biggers		sequence number, which is a monotonically increasing
8407c9093cSEric Biggers		number assigned to every drive.
8507c9093cSEric Biggers		Some devices, like the loop device, refresh such number
8607c9093cSEric Biggers		every time the backing file is changed.
8707c9093cSEric Biggers		The value type is 64 bit unsigned.
8807c9093cSEric Biggers
8907c9093cSEric Biggers
9007c9093cSEric BiggersWhat:		/sys/block/<disk>/inflight
9107c9093cSEric BiggersDate:		October 2009
9207c9093cSEric BiggersContact:	Jens Axboe <axboe@kernel.dk>, Nikanth Karthikesan <knikanth@suse.de>
9307c9093cSEric BiggersDescription:
9407c9093cSEric Biggers		Reports the number of I/O requests currently in progress
9507c9093cSEric Biggers		(pending / in flight) in a device driver. This can be less
9607c9093cSEric Biggers		than the number of requests queued in the block device queue.
9707c9093cSEric Biggers		The report contains 2 fields: one for read requests
9807c9093cSEric Biggers		and one for write requests.
9907c9093cSEric Biggers		The value type is unsigned int.
10007c9093cSEric Biggers		Cf. Documentation/block/stat.rst which contains a single value for
10107c9093cSEric Biggers		requests in flight.
102849ab826SEric Biggers		This is related to /sys/block/<disk>/queue/nr_requests
10307c9093cSEric Biggers		and for SCSI device also its queue_depth.
10407c9093cSEric Biggers
10507c9093cSEric Biggers
10607c9093cSEric BiggersWhat:		/sys/block/<disk>/integrity/device_is_integrity_capable
10707c9093cSEric BiggersDate:		July 2014
10807c9093cSEric BiggersContact:	Martin K. Petersen <martin.petersen@oracle.com>
10907c9093cSEric BiggersDescription:
11007c9093cSEric Biggers		Indicates whether a storage device is capable of storing
11107c9093cSEric Biggers		integrity metadata. Set if the device is T10 PI-capable.
112fc22b34eSMilan Broz		This flag is set to 1 if the storage media is formatted
113fc22b34eSMilan Broz		with T10 Protection Information. If the storage media is
114fc22b34eSMilan Broz		not formatted with T10 Protection Information, this flag
115fc22b34eSMilan Broz		is set to 0.
11607c9093cSEric Biggers
11707c9093cSEric Biggers
11807c9093cSEric BiggersWhat:		/sys/block/<disk>/integrity/format
11907c9093cSEric BiggersDate:		June 2008
12007c9093cSEric BiggersContact:	Martin K. Petersen <martin.petersen@oracle.com>
12107c9093cSEric BiggersDescription:
12207c9093cSEric Biggers		Metadata format for integrity capable block device.
12307c9093cSEric Biggers		E.g. T10-DIF-TYPE1-CRC.
124fc22b34eSMilan Broz		This field describes the type of T10 Protection Information
125fc22b34eSMilan Broz		that the block device can send and receive.
126fc22b34eSMilan Broz		If the device can store application integrity metadata but
127fc22b34eSMilan Broz		no T10 Protection Information profile is used, this field
128fc22b34eSMilan Broz		contains "nop".
129fc22b34eSMilan Broz		If the device does not support integrity metadata, this
130fc22b34eSMilan Broz		field contains "none".
13107c9093cSEric Biggers
13207c9093cSEric Biggers
13307c9093cSEric BiggersWhat:		/sys/block/<disk>/integrity/protection_interval_bytes
13407c9093cSEric BiggersDate:		July 2015
13507c9093cSEric BiggersContact:	Martin K. Petersen <martin.petersen@oracle.com>
13607c9093cSEric BiggersDescription:
13707c9093cSEric Biggers		Describes the number of data bytes which are protected
13807c9093cSEric Biggers		by one integrity tuple. Typically the device's logical
13907c9093cSEric Biggers		block size.
14007c9093cSEric Biggers
14107c9093cSEric Biggers
14207c9093cSEric BiggersWhat:		/sys/block/<disk>/integrity/read_verify
14307c9093cSEric BiggersDate:		June 2008
14407c9093cSEric BiggersContact:	Martin K. Petersen <martin.petersen@oracle.com>
14507c9093cSEric BiggersDescription:
14607c9093cSEric Biggers		Indicates whether the block layer should verify the
14707c9093cSEric Biggers		integrity of read requests serviced by devices that
14807c9093cSEric Biggers		support sending integrity metadata.
14907c9093cSEric Biggers
15007c9093cSEric Biggers
15107c9093cSEric BiggersWhat:		/sys/block/<disk>/integrity/tag_size
15207c9093cSEric BiggersDate:		June 2008
15307c9093cSEric BiggersContact:	Martin K. Petersen <martin.petersen@oracle.com>
15407c9093cSEric BiggersDescription:
15507c9093cSEric Biggers		Number of bytes of integrity tag space available per
156fc22b34eSMilan Broz		protection_interval_bytes, which is typically
157fc22b34eSMilan Broz		the device's logical block size.
158fc22b34eSMilan Broz		This field describes the size of the application tag
159fc22b34eSMilan Broz		if the storage device is formatted with T10 Protection
160fc22b34eSMilan Broz		Information and permits use of the application tag.
161fc22b34eSMilan Broz		The tag_size is reported in bytes and indicates the
162fc22b34eSMilan Broz		space available for adding an opaque tag to each block
163fc22b34eSMilan Broz		(protection_interval_bytes).
164fc22b34eSMilan Broz		If the device does not support T10 Protection Information
165fc22b34eSMilan Broz		(even if the device provides application integrity
166fc22b34eSMilan Broz		metadata space), this field is set to 0.
16707c9093cSEric Biggers
16807c9093cSEric Biggers
16907c9093cSEric BiggersWhat:		/sys/block/<disk>/integrity/write_generate
17007c9093cSEric BiggersDate:		June 2008
17107c9093cSEric BiggersContact:	Martin K. Petersen <martin.petersen@oracle.com>
17207c9093cSEric BiggersDescription:
17307c9093cSEric Biggers		Indicates whether the block layer should automatically
17407c9093cSEric Biggers		generate checksums for write requests bound for
17507c9093cSEric Biggers		devices that support receiving integrity metadata.
17607c9093cSEric Biggers
17707c9093cSEric Biggers
178a4217c67SChristoph HellwigWhat:		/sys/block/<disk>/partscan
179a4217c67SChristoph HellwigDate:		May 2024
180a4217c67SChristoph HellwigContact:	Christoph Hellwig <hch@lst.de>
181a4217c67SChristoph HellwigDescription:
182a4217c67SChristoph Hellwig		The /sys/block/<disk>/partscan files reports if partition
183a4217c67SChristoph Hellwig		scanning is enabled for the disk.  It returns "1" if partition
184a4217c67SChristoph Hellwig		scanning is enabled, or "0" if not.  The value type is a 32-bit
185a4217c67SChristoph Hellwig		unsigned integer, but only "0" and "1" are valid values.
186a4217c67SChristoph Hellwig
187a4217c67SChristoph Hellwig
18807c9093cSEric BiggersWhat:		/sys/block/<disk>/<partition>/alignment_offset
18907c9093cSEric BiggersDate:		April 2009
19007c9093cSEric BiggersContact:	Martin K. Petersen <martin.petersen@oracle.com>
19107c9093cSEric BiggersDescription:
19207c9093cSEric Biggers		Storage devices may report a physical block size that is
19307c9093cSEric Biggers		bigger than the logical block size (for instance a drive
19407c9093cSEric Biggers		with 4KB physical sectors exposing 512-byte logical
19507c9093cSEric Biggers		blocks to the operating system).  This parameter
19607c9093cSEric Biggers		indicates how many bytes the beginning of the partition
19707c9093cSEric Biggers		is offset from the disk's natural alignment.
19807c9093cSEric Biggers
19907c9093cSEric Biggers
20007c9093cSEric BiggersWhat:		/sys/block/<disk>/<partition>/discard_alignment
20107c9093cSEric BiggersDate:		May 2011
20207c9093cSEric BiggersContact:	Martin K. Petersen <martin.petersen@oracle.com>
20307c9093cSEric BiggersDescription:
20407c9093cSEric Biggers		Devices that support discard functionality may
20507c9093cSEric Biggers		internally allocate space in units that are bigger than
20607c9093cSEric Biggers		the exported logical block size. The discard_alignment
20707c9093cSEric Biggers		parameter indicates how many bytes the beginning of the
20807c9093cSEric Biggers		partition is offset from the internal allocation unit's
20907c9093cSEric Biggers		natural alignment.
21007c9093cSEric Biggers
21107c9093cSEric Biggers
21207c9093cSEric BiggersWhat:		/sys/block/<disk>/<partition>/stat
21307c9093cSEric BiggersDate:		February 2008
21407c9093cSEric BiggersContact:	Jerome Marchand <jmarchan@redhat.com>
21507c9093cSEric BiggersDescription:
21607c9093cSEric Biggers		The /sys/block/<disk>/<partition>/stat files display the
21707c9093cSEric Biggers		I/O statistics of partition <partition>. The format is the
21807c9093cSEric Biggers		same as the format of /sys/block/<disk>/stat.
21907c9093cSEric Biggers
22007c9093cSEric Biggers
221849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/add_random
222849ab826SEric BiggersDate:		June 2010
223849ab826SEric BiggersContact:	linux-block@vger.kernel.org
224849ab826SEric BiggersDescription:
225849ab826SEric Biggers		[RW] This file allows to turn off the disk entropy contribution.
226849ab826SEric Biggers		Default value of this file is '1'(on).
227849ab826SEric Biggers
228849ab826SEric Biggers
22907c9093cSEric BiggersWhat:		/sys/block/<disk>/queue/chunk_sectors
23007c9093cSEric BiggersDate:		September 2016
23107c9093cSEric BiggersContact:	Hannes Reinecke <hare@suse.com>
23207c9093cSEric BiggersDescription:
233849ab826SEric Biggers		[RO] chunk_sectors has different meaning depending on the type
23407c9093cSEric Biggers		of the disk. For a RAID device (dm-raid), chunk_sectors
235849ab826SEric Biggers		indicates the size in 512B sectors of the RAID volume stripe
236849ab826SEric Biggers		segment. For a zoned block device, either host-aware or
237849ab826SEric Biggers		host-managed, chunk_sectors indicates the size in 512B sectors
238849ab826SEric Biggers		of the zones of the device, with the eventual exception of the
239849ab826SEric Biggers		last zone of the device which may be smaller.
240849ab826SEric Biggers
241849ab826SEric Biggers
24220f01f16SEric BiggersWhat:		/sys/block/<disk>/queue/crypto/
24320f01f16SEric BiggersDate:		February 2022
24420f01f16SEric BiggersContact:	linux-block@vger.kernel.org
24520f01f16SEric BiggersDescription:
24620f01f16SEric Biggers		The presence of this subdirectory of /sys/block/<disk>/queue/
24720f01f16SEric Biggers		indicates that the device supports inline encryption.  This
24820f01f16SEric Biggers		subdirectory contains files which describe the inline encryption
24920f01f16SEric Biggers		capabilities of the device.  For more information about inline
25020f01f16SEric Biggers		encryption, refer to Documentation/block/inline-encryption.rst.
25120f01f16SEric Biggers
25220f01f16SEric Biggers
253e35fde43SEric BiggersWhat:		/sys/block/<disk>/queue/crypto/hw_wrapped_keys
254e35fde43SEric BiggersDate:		February 2025
255e35fde43SEric BiggersContact:	linux-block@vger.kernel.org
256e35fde43SEric BiggersDescription:
257e35fde43SEric Biggers		[RO] The presence of this file indicates that the device
258e35fde43SEric Biggers		supports hardware-wrapped inline encryption keys, i.e. key blobs
259e35fde43SEric Biggers		that can only be unwrapped and used by dedicated hardware.  For
260e35fde43SEric Biggers		more information about hardware-wrapped inline encryption keys,
261e35fde43SEric Biggers		see Documentation/block/inline-encryption.rst.
262e35fde43SEric Biggers
263e35fde43SEric Biggers
26420f01f16SEric BiggersWhat:		/sys/block/<disk>/queue/crypto/max_dun_bits
26520f01f16SEric BiggersDate:		February 2022
26620f01f16SEric BiggersContact:	linux-block@vger.kernel.org
26720f01f16SEric BiggersDescription:
26820f01f16SEric Biggers		[RO] This file shows the maximum length, in bits, of data unit
26920f01f16SEric Biggers		numbers accepted by the device in inline encryption requests.
27020f01f16SEric Biggers
27120f01f16SEric Biggers
27220f01f16SEric BiggersWhat:		/sys/block/<disk>/queue/crypto/modes/<mode>
27320f01f16SEric BiggersDate:		February 2022
27420f01f16SEric BiggersContact:	linux-block@vger.kernel.org
27520f01f16SEric BiggersDescription:
27620f01f16SEric Biggers		[RO] For each crypto mode (i.e., encryption/decryption
27720f01f16SEric Biggers		algorithm) the device supports with inline encryption, a file
27820f01f16SEric Biggers		will exist at this location.  It will contain a hexadecimal
27920f01f16SEric Biggers		number that is a bitmask of the supported data unit sizes, in
28020f01f16SEric Biggers		bytes, for that crypto mode.
28120f01f16SEric Biggers
28220f01f16SEric Biggers		Currently, the crypto modes that may be supported are:
28320f01f16SEric Biggers
28420f01f16SEric Biggers		   * AES-256-XTS
28520f01f16SEric Biggers		   * AES-128-CBC-ESSIV
28620f01f16SEric Biggers		   * Adiantum
28720f01f16SEric Biggers
28820f01f16SEric Biggers		For example, if a device supports AES-256-XTS inline encryption
28920f01f16SEric Biggers		with data unit sizes of 512 and 4096 bytes, the file
29020f01f16SEric Biggers		/sys/block/<disk>/queue/crypto/modes/AES-256-XTS will exist and
29120f01f16SEric Biggers		will contain "0x1200".
29220f01f16SEric Biggers
29320f01f16SEric Biggers
29420f01f16SEric BiggersWhat:		/sys/block/<disk>/queue/crypto/num_keyslots
29520f01f16SEric BiggersDate:		February 2022
29620f01f16SEric BiggersContact:	linux-block@vger.kernel.org
29720f01f16SEric BiggersDescription:
29820f01f16SEric Biggers		[RO] This file shows the number of keyslots the device has for
29920f01f16SEric Biggers		use with inline encryption.
30020f01f16SEric Biggers
30120f01f16SEric Biggers
302e35fde43SEric BiggersWhat:		/sys/block/<disk>/queue/crypto/raw_keys
303e35fde43SEric BiggersDate:		February 2025
304e35fde43SEric BiggersContact:	linux-block@vger.kernel.org
305e35fde43SEric BiggersDescription:
306e35fde43SEric Biggers		[RO] The presence of this file indicates that the device
307e35fde43SEric Biggers		supports raw inline encryption keys, i.e. keys that are managed
308e35fde43SEric Biggers		in raw, plaintext form in software.
309e35fde43SEric Biggers
310e35fde43SEric Biggers
311849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/dax
312849ab826SEric BiggersDate:		June 2016
313849ab826SEric BiggersContact:	linux-block@vger.kernel.org
314849ab826SEric BiggersDescription:
315849ab826SEric Biggers		[RO] This file indicates whether the device supports Direct
316849ab826SEric Biggers		Access (DAX), used by CPU-addressable storage to bypass the
317849ab826SEric Biggers		pagecache.  It shows '1' if true, '0' if not.
31807c9093cSEric Biggers
31907c9093cSEric Biggers
32007c9093cSEric BiggersWhat:		/sys/block/<disk>/queue/discard_granularity
32107c9093cSEric BiggersDate:		May 2011
32207c9093cSEric BiggersContact:	Martin K. Petersen <martin.petersen@oracle.com>
32307c9093cSEric BiggersDescription:
324849ab826SEric Biggers		[RO] Devices that support discard functionality may internally
325849ab826SEric Biggers		allocate space using units that are bigger than the logical
326849ab826SEric Biggers		block size. The discard_granularity parameter indicates the size
327849ab826SEric Biggers		of the internal allocation unit in bytes if reported by the
328849ab826SEric Biggers		device. Otherwise the discard_granularity will be set to match
329849ab826SEric Biggers		the device's physical block size. A discard_granularity of 0
330849ab826SEric Biggers		means that the device does not support discard functionality.
33107c9093cSEric Biggers
33207c9093cSEric Biggers
33307c9093cSEric BiggersWhat:		/sys/block/<disk>/queue/discard_max_bytes
33407c9093cSEric BiggersDate:		May 2011
33507c9093cSEric BiggersContact:	Martin K. Petersen <martin.petersen@oracle.com>
33607c9093cSEric BiggersDescription:
337849ab826SEric Biggers		[RW] While discard_max_hw_bytes is the hardware limit for the
338849ab826SEric Biggers		device, this setting is the software limit. Some devices exhibit
339849ab826SEric Biggers		large latencies when large discards are issued, setting this
340849ab826SEric Biggers		value lower will make Linux issue smaller discards and
341849ab826SEric Biggers		potentially help reduce latencies induced by large discard
342849ab826SEric Biggers		operations.
343849ab826SEric Biggers
344849ab826SEric Biggers
345849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/discard_max_hw_bytes
346849ab826SEric BiggersDate:		July 2015
347849ab826SEric BiggersContact:	linux-block@vger.kernel.org
348849ab826SEric BiggersDescription:
349849ab826SEric Biggers		[RO] Devices that support discard functionality may have
350849ab826SEric Biggers		internal limits on the number of bytes that can be trimmed or
351849ab826SEric Biggers		unmapped in a single operation.  The `discard_max_hw_bytes`
352849ab826SEric Biggers		parameter is set by the device driver to the maximum number of
353849ab826SEric Biggers		bytes that can be discarded in a single operation.  Discard
354849ab826SEric Biggers		requests issued to the device must not exceed this limit.  A
355849ab826SEric Biggers		`discard_max_hw_bytes` value of 0 means that the device does not
356849ab826SEric Biggers		support discard functionality.
35707c9093cSEric Biggers
35807c9093cSEric Biggers
35907c9093cSEric BiggersWhat:		/sys/block/<disk>/queue/discard_zeroes_data
36007c9093cSEric BiggersDate:		May 2011
36107c9093cSEric BiggersContact:	Martin K. Petersen <martin.petersen@oracle.com>
36207c9093cSEric BiggersDescription:
363849ab826SEric Biggers		[RO] Will always return 0.  Don't rely on any specific behavior
36407c9093cSEric Biggers		for discards, and don't read this file.
36507c9093cSEric Biggers
36607c9093cSEric Biggers
3673850e13fSKeith BuschWhat:		/sys/block/<disk>/queue/dma_alignment
3683850e13fSKeith BuschDate:		May 2022
3693850e13fSKeith BuschContact:	linux-block@vger.kernel.org
3703850e13fSKeith BuschDescription:
3713850e13fSKeith Busch		Reports the alignment that user space addresses must have to be
3723850e13fSKeith Busch		used for raw block device access with O_DIRECT and other driver
3733850e13fSKeith Busch		specific passthrough mechanisms.
3743850e13fSKeith Busch
3753850e13fSKeith Busch
376849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/fua
377849ab826SEric BiggersDate:		May 2018
378849ab826SEric BiggersContact:	linux-block@vger.kernel.org
379849ab826SEric BiggersDescription:
380849ab826SEric Biggers		[RO] Whether or not the block driver supports the FUA flag for
381849ab826SEric Biggers		write requests.  FUA stands for Force Unit Access. If the FUA
382849ab826SEric Biggers		flag is set that means that write requests must bypass the
383849ab826SEric Biggers		volatile cache of the storage device.
384849ab826SEric Biggers
385849ab826SEric Biggers
386849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/hw_sector_size
387849ab826SEric BiggersDate:		January 2008
388849ab826SEric BiggersContact:	linux-block@vger.kernel.org
389849ab826SEric BiggersDescription:
390849ab826SEric Biggers		[RO] This is the hardware sector size of the device, in bytes.
391849ab826SEric Biggers
392849ab826SEric Biggers
393849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/independent_access_ranges/
394849ab826SEric BiggersDate:		October 2021
395849ab826SEric BiggersContact:	linux-block@vger.kernel.org
396849ab826SEric BiggersDescription:
397849ab826SEric Biggers		[RO] The presence of this sub-directory of the
398849ab826SEric Biggers		/sys/block/xxx/queue/ directory indicates that the device is
399849ab826SEric Biggers		capable of executing requests targeting different sector ranges
400849ab826SEric Biggers		in parallel. For instance, single LUN multi-actuator hard-disks
401849ab826SEric Biggers		will have an independent_access_ranges directory if the device
402ebab9426SBjorn Helgaas		correctly advertises the sector ranges of its actuators.
403849ab826SEric Biggers
404849ab826SEric Biggers		The independent_access_ranges directory contains one directory
405849ab826SEric Biggers		per access range, with each range described using the sector
406849ab826SEric Biggers		(RO) attribute file to indicate the first sector of the range
407849ab826SEric Biggers		and the nr_sectors (RO) attribute file to indicate the total
408849ab826SEric Biggers		number of sectors in the range starting from the first sector of
409849ab826SEric Biggers		the range.  For example, a dual-actuator hard-disk will have the
410849ab826SEric Biggers		following independent_access_ranges entries.::
411849ab826SEric Biggers
412849ab826SEric Biggers			$ tree /sys/block/<disk>/queue/independent_access_ranges/
413849ab826SEric Biggers			/sys/block/<disk>/queue/independent_access_ranges/
414849ab826SEric Biggers			|-- 0
415849ab826SEric Biggers			|   |-- nr_sectors
416849ab826SEric Biggers			|   `-- sector
417849ab826SEric Biggers			`-- 1
418849ab826SEric Biggers			    |-- nr_sectors
419849ab826SEric Biggers			    `-- sector
420849ab826SEric Biggers
421849ab826SEric Biggers		The sector and nr_sectors attributes use 512B sector unit,
422849ab826SEric Biggers		regardless of the actual block size of the device. Independent
423849ab826SEric Biggers		access ranges do not overlap and include all sectors within the
424849ab826SEric Biggers		device capacity. The access ranges are numbered in increasing
425849ab826SEric Biggers		order of the range start sector, that is, the sector attribute
426849ab826SEric Biggers		of range 0 always has the value 0.
427849ab826SEric Biggers
428849ab826SEric Biggers
429849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/io_poll
430849ab826SEric BiggersDate:		November 2015
431849ab826SEric BiggersContact:	linux-block@vger.kernel.org
432849ab826SEric BiggersDescription:
433849ab826SEric Biggers		[RW] When read, this file shows whether polling is enabled (1)
434849ab826SEric Biggers		or disabled (0).  Writing '0' to this file will disable polling
435849ab826SEric Biggers		for this device.  Writing any non-zero value will enable this
436849ab826SEric Biggers		feature.
437849ab826SEric Biggers
438849ab826SEric Biggers
439849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/io_poll_delay
440849ab826SEric BiggersDate:		November 2016
441849ab826SEric BiggersContact:	linux-block@vger.kernel.org
442849ab826SEric BiggersDescription:
44354bdd67dSKeith Busch		[RW] This was used to control what kind of polling will be
44454bdd67dSKeith Busch		performed.  It is now fixed to -1, which is classic polling.
445849ab826SEric Biggers		In this mode, the CPU will repeatedly ask for completions
44654bdd67dSKeith Busch		without giving up any time.
44754bdd67dSKeith Busch		<deprecated>
448849ab826SEric Biggers
449849ab826SEric Biggers
45007c9093cSEric BiggersWhat:		/sys/block/<disk>/queue/io_timeout
45107c9093cSEric BiggersDate:		November 2018
45207c9093cSEric BiggersContact:	Weiping Zhang <zhangweiping@didiglobal.com>
45307c9093cSEric BiggersDescription:
454849ab826SEric Biggers		[RW] io_timeout is the request timeout in milliseconds. If a
455849ab826SEric Biggers		request does not complete in this time then the block driver
456849ab826SEric Biggers		timeout handler is invoked. That timeout handler can decide to
457849ab826SEric Biggers		retry the request, to fail it or to start a device recovery
458849ab826SEric Biggers		strategy.
459849ab826SEric Biggers
460849ab826SEric Biggers
461849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/iostats
462849ab826SEric BiggersDate:		January 2009
463849ab826SEric BiggersContact:	linux-block@vger.kernel.org
464849ab826SEric BiggersDescription:
465849ab826SEric Biggers		[RW] This file is used to control (on/off) the iostats
466849ab826SEric Biggers		accounting of the disk.
46707c9093cSEric Biggers
468110234daSKeith BuschWhat:		/sys/block/<disk>/queue/iostats_passthrough
469110234daSKeith BuschDate:		October 2024
470110234daSKeith BuschContact:	linux-block@vger.kernel.org
471110234daSKeith BuschDescription:
472110234daSKeith Busch		[RW] This file is used to control (on/off) the iostats
473110234daSKeith Busch		accounting of the disk for passthrough commands.
474110234daSKeith Busch
47507c9093cSEric Biggers
47607c9093cSEric BiggersWhat:		/sys/block/<disk>/queue/logical_block_size
47707c9093cSEric BiggersDate:		May 2009
47807c9093cSEric BiggersContact:	Martin K. Petersen <martin.petersen@oracle.com>
47907c9093cSEric BiggersDescription:
480849ab826SEric Biggers		[RO] This is the smallest unit the storage device can address.
481849ab826SEric Biggers		It is typically 512 bytes.
48207c9093cSEric Biggers
48307c9093cSEric Biggers
48407c9093cSEric BiggersWhat:		/sys/block/<disk>/queue/max_active_zones
48507c9093cSEric BiggersDate:		July 2020
48607c9093cSEric BiggersContact:	Niklas Cassel <niklas.cassel@wdc.com>
48707c9093cSEric BiggersDescription:
488849ab826SEric Biggers		[RO] For zoned block devices (zoned attribute indicating
48907c9093cSEric Biggers		"host-managed" or "host-aware"), the sum of zones belonging to
49007c9093cSEric Biggers		any of the zone states: EXPLICIT OPEN, IMPLICIT OPEN or CLOSED,
49107c9093cSEric Biggers		is limited by this value. If this value is 0, there is no limit.
49207c9093cSEric Biggers
493849ab826SEric Biggers		If the host attempts to exceed this limit, the driver should
494849ab826SEric Biggers		report this error with BLK_STS_ZONE_ACTIVE_RESOURCE, which user
495849ab826SEric Biggers		space may see as the EOVERFLOW errno.
496849ab826SEric Biggers
497849ab826SEric Biggers
498849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/max_discard_segments
499849ab826SEric BiggersDate:		February 2017
500849ab826SEric BiggersContact:	linux-block@vger.kernel.org
501849ab826SEric BiggersDescription:
502849ab826SEric Biggers		[RO] The maximum number of DMA scatter/gather entries in a
503849ab826SEric Biggers		discard request.
504849ab826SEric Biggers
505849ab826SEric Biggers
506849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/max_hw_sectors_kb
507849ab826SEric BiggersDate:		September 2004
508849ab826SEric BiggersContact:	linux-block@vger.kernel.org
509849ab826SEric BiggersDescription:
510849ab826SEric Biggers		[RO] This is the maximum number of kilobytes supported in a
511849ab826SEric Biggers		single data transfer.
512849ab826SEric Biggers
513849ab826SEric Biggers
514849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/max_integrity_segments
515849ab826SEric BiggersDate:		September 2010
516849ab826SEric BiggersContact:	linux-block@vger.kernel.org
517849ab826SEric BiggersDescription:
518849ab826SEric Biggers		[RO] Maximum number of elements in a DMA scatter/gather list
519849ab826SEric Biggers		with integrity data that will be submitted by the block layer
520849ab826SEric Biggers		core to the associated block driver.
521849ab826SEric Biggers
52207c9093cSEric Biggers
52307c9093cSEric BiggersWhat:		/sys/block/<disk>/queue/max_open_zones
52407c9093cSEric BiggersDate:		July 2020
52507c9093cSEric BiggersContact:	Niklas Cassel <niklas.cassel@wdc.com>
52607c9093cSEric BiggersDescription:
527849ab826SEric Biggers		[RO] For zoned block devices (zoned attribute indicating
52807c9093cSEric Biggers		"host-managed" or "host-aware"), the sum of zones belonging to
529849ab826SEric Biggers		any of the zone states: EXPLICIT OPEN or IMPLICIT OPEN, is
530849ab826SEric Biggers		limited by this value. If this value is 0, there is no limit.
531849ab826SEric Biggers
532849ab826SEric Biggers
533849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/max_sectors_kb
534849ab826SEric BiggersDate:		September 2004
535849ab826SEric BiggersContact:	linux-block@vger.kernel.org
536849ab826SEric BiggersDescription:
537849ab826SEric Biggers		[RW] This is the maximum number of kilobytes that the block
538849ab826SEric Biggers		layer will allow for a filesystem request. Must be smaller than
539c9c77418SKeith Busch		or equal to the maximum size allowed by the hardware. Write 0
540c9c77418SKeith Busch		to use default kernel settings.
541849ab826SEric Biggers
542849ab826SEric Biggers
543849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/max_segment_size
544849ab826SEric BiggersDate:		March 2010
545849ab826SEric BiggersContact:	linux-block@vger.kernel.org
546849ab826SEric BiggersDescription:
547849ab826SEric Biggers		[RO] Maximum size in bytes of a single element in a DMA
548849ab826SEric Biggers		scatter/gather list.
549849ab826SEric Biggers
550849ab826SEric Biggers
551849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/max_segments
552849ab826SEric BiggersDate:		March 2010
553849ab826SEric BiggersContact:	linux-block@vger.kernel.org
554849ab826SEric BiggersDescription:
555849ab826SEric Biggers		[RO] Maximum number of elements in a DMA scatter/gather list
556849ab826SEric Biggers		that is submitted to the associated block driver.
55707c9093cSEric Biggers
55807c9093cSEric Biggers
55907c9093cSEric BiggersWhat:		/sys/block/<disk>/queue/minimum_io_size
56007c9093cSEric BiggersDate:		April 2009
56107c9093cSEric BiggersContact:	Martin K. Petersen <martin.petersen@oracle.com>
56207c9093cSEric BiggersDescription:
563849ab826SEric Biggers		[RO] Storage devices may report a granularity or preferred
564849ab826SEric Biggers		minimum I/O size which is the smallest request the device can
565849ab826SEric Biggers		perform without incurring a performance penalty.  For disk
566849ab826SEric Biggers		drives this is often the physical block size.  For RAID arrays
567849ab826SEric Biggers		it is often the stripe chunk size.  A properly aligned multiple
568849ab826SEric Biggers		of minimum_io_size is the preferred request size for workloads
569849ab826SEric Biggers		where a high number of I/O operations is desired.
57007c9093cSEric Biggers
57107c9093cSEric Biggers
57207c9093cSEric BiggersWhat:		/sys/block/<disk>/queue/nomerges
57307c9093cSEric BiggersDate:		January 2010
5748b0551a7SEric BiggersContact:	linux-block@vger.kernel.org
57507c9093cSEric BiggersDescription:
576849ab826SEric Biggers		[RW] Standard I/O elevator operations include attempts to merge
577849ab826SEric Biggers		contiguous I/Os. For known random I/O loads these attempts will
578849ab826SEric Biggers		always fail and result in extra cycles being spent in the
579849ab826SEric Biggers		kernel. This allows one to turn off this behavior on one of two
580849ab826SEric Biggers		ways: When set to 1, complex merge checks are disabled, but the
581849ab826SEric Biggers		simple one-shot merges with the previous I/O request are
582849ab826SEric Biggers		enabled. When set to 2, all merge tries are disabled. The
583849ab826SEric Biggers		default value is 0 - which enables all types of merge tries.
584849ab826SEric Biggers
585849ab826SEric Biggers
586849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/nr_requests
587849ab826SEric BiggersDate:		July 2003
588849ab826SEric BiggersContact:	linux-block@vger.kernel.org
589849ab826SEric BiggersDescription:
590849ab826SEric Biggers		[RW] This controls how many requests may be allocated in the
591849ab826SEric Biggers		block layer for read or write requests. Note that the total
592849ab826SEric Biggers		allocated number may be twice this amount, since it applies only
593849ab826SEric Biggers		to reads or writes (not the accumulated sum).
594849ab826SEric Biggers
595849ab826SEric Biggers		To avoid priority inversion through request starvation, a
596849ab826SEric Biggers		request queue maintains a separate request pool per each cgroup
597849ab826SEric Biggers		when CONFIG_BLK_CGROUP is enabled, and this parameter applies to
598849ab826SEric Biggers		each such per-block-cgroup request pool.  IOW, if there are N
599849ab826SEric Biggers		block cgroups, each request queue may have up to N request
600849ab826SEric Biggers		pools, each independently regulated by nr_requests.
60107c9093cSEric Biggers
60207c9093cSEric Biggers
60307c9093cSEric BiggersWhat:		/sys/block/<disk>/queue/nr_zones
60407c9093cSEric BiggersDate:		November 2018
60507c9093cSEric BiggersContact:	Damien Le Moal <damien.lemoal@wdc.com>
60607c9093cSEric BiggersDescription:
607849ab826SEric Biggers		[RO] nr_zones indicates the total number of zones of a zoned
608849ab826SEric Biggers		block device ("host-aware" or "host-managed" zone model). For
609849ab826SEric Biggers		regular block devices, the value is always 0.
61007c9093cSEric Biggers
61107c9093cSEric Biggers
61207c9093cSEric BiggersWhat:		/sys/block/<disk>/queue/optimal_io_size
61307c9093cSEric BiggersDate:		April 2009
61407c9093cSEric BiggersContact:	Martin K. Petersen <martin.petersen@oracle.com>
61507c9093cSEric BiggersDescription:
616849ab826SEric Biggers		[RO] Storage devices may report an optimal I/O size, which is
617849ab826SEric Biggers		the device's preferred unit for sustained I/O.  This is rarely
618849ab826SEric Biggers		reported for disk drives.  For RAID arrays it is usually the
619849ab826SEric Biggers		stripe width or the internal track size.  A properly aligned
620849ab826SEric Biggers		multiple of optimal_io_size is the preferred request size for
621849ab826SEric Biggers		workloads where sustained throughput is desired.  If no optimal
622849ab826SEric Biggers		I/O size is reported this file contains 0.
62307c9093cSEric Biggers
62407c9093cSEric Biggers
62507c9093cSEric BiggersWhat:		/sys/block/<disk>/queue/physical_block_size
62607c9093cSEric BiggersDate:		May 2009
62707c9093cSEric BiggersContact:	Martin K. Petersen <martin.petersen@oracle.com>
62807c9093cSEric BiggersDescription:
629849ab826SEric Biggers		[RO] This is the smallest unit a physical storage device can
630849ab826SEric Biggers		write atomically.  It is usually the same as the logical block
631849ab826SEric Biggers		size but may be bigger.  One example is SATA drives with 4KB
632849ab826SEric Biggers		sectors that expose a 512-byte logical block size to the
633849ab826SEric Biggers		operating system.  For stacked block devices the
634849ab826SEric Biggers		physical_block_size variable contains the maximum
635849ab826SEric Biggers		physical_block_size of the component devices.
636849ab826SEric Biggers
637849ab826SEric Biggers
638849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/read_ahead_kb
639849ab826SEric BiggersDate:		May 2004
640849ab826SEric BiggersContact:	linux-block@vger.kernel.org
641849ab826SEric BiggersDescription:
642849ab826SEric Biggers		[RW] Maximum number of kilobytes to read-ahead for filesystems
643849ab826SEric Biggers		on this block device.
644849ab826SEric Biggers
6450740e543SYafang Shao		For MADV_HUGEPAGE, the readahead size may exceed this setting
6460740e543SYafang Shao		since its granularity is based on the hugepage size.
6470740e543SYafang Shao
648849ab826SEric Biggers
649849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/rotational
650849ab826SEric BiggersDate:		January 2009
651849ab826SEric BiggersContact:	linux-block@vger.kernel.org
652849ab826SEric BiggersDescription:
653849ab826SEric Biggers		[RW] This file is used to stat if the device is of rotational
654849ab826SEric Biggers		type or non-rotational type.
655849ab826SEric Biggers
656849ab826SEric Biggers
657849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/rq_affinity
658849ab826SEric BiggersDate:		September 2008
659849ab826SEric BiggersContact:	linux-block@vger.kernel.org
660849ab826SEric BiggersDescription:
661849ab826SEric Biggers		[RW] If this option is '1', the block layer will migrate request
662849ab826SEric Biggers		completions to the cpu "group" that originally submitted the
663849ab826SEric Biggers		request. For some workloads this provides a significant
664849ab826SEric Biggers		reduction in CPU cycles due to caching effects.
665849ab826SEric Biggers
666849ab826SEric Biggers		For storage configurations that need to maximize distribution of
667849ab826SEric Biggers		completion processing setting this option to '2' forces the
668849ab826SEric Biggers		completion to run on the requesting cpu (bypassing the "group"
669849ab826SEric Biggers		aggregation logic).
670849ab826SEric Biggers
671849ab826SEric Biggers
672849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/scheduler
673849ab826SEric BiggersDate:		October 2004
674849ab826SEric BiggersContact:	linux-block@vger.kernel.org
675849ab826SEric BiggersDescription:
676849ab826SEric Biggers		[RW] When read, this file will display the current and available
677849ab826SEric Biggers		IO schedulers for this block device. The currently active IO
678849ab826SEric Biggers		scheduler will be enclosed in [] brackets. Writing an IO
679849ab826SEric Biggers		scheduler name to this file will switch control of this block
680849ab826SEric Biggers		device to that new IO scheduler. Note that writing an IO
681849ab826SEric Biggers		scheduler name to this file will attempt to load that IO
682849ab826SEric Biggers		scheduler module, if it isn't already present in the system.
683849ab826SEric Biggers
684849ab826SEric Biggers
68511630104SEric BiggersWhat:		/sys/block/<disk>/queue/stable_writes
68611630104SEric BiggersDate:		September 2020
68711630104SEric BiggersContact:	linux-block@vger.kernel.org
68811630104SEric BiggersDescription:
68911630104SEric Biggers		[RW] This file will contain '1' if memory must not be modified
69011630104SEric Biggers		while it is being used in a write request to this device.  When
69111630104SEric Biggers		this is the case and the kernel is performing writeback of a
69211630104SEric Biggers		page, the kernel will wait for writeback to complete before
69311630104SEric Biggers		allowing the page to be modified again, rather than allowing
69411630104SEric Biggers		immediate modification as is normally the case.  This
69511630104SEric Biggers		restriction arises when the device accesses the memory multiple
69611630104SEric Biggers		times where the same data must be seen every time -- for
69711630104SEric Biggers		example, once to calculate a checksum and once to actually write
69811630104SEric Biggers		the data.  If no such restriction exists, this file will contain
69911630104SEric Biggers		'0'.  This file is writable for testing purposes.
70011630104SEric Biggers
7018bc2f7c6SEric BiggersWhat:		/sys/block/<disk>/queue/virt_boundary_mask
7028bc2f7c6SEric BiggersDate:		April 2021
7038bc2f7c6SEric BiggersContact:	linux-block@vger.kernel.org
7048bc2f7c6SEric BiggersDescription:
7058bc2f7c6SEric Biggers		[RO] This file shows the I/O segment memory alignment mask for
7068bc2f7c6SEric Biggers		the block device.  I/O requests to this device will be split
7078bc2f7c6SEric Biggers		between segments wherever either the memory address of the end
7088bc2f7c6SEric Biggers		of the previous segment or the memory address of the beginning
7098bc2f7c6SEric Biggers		of the current segment is not aligned to virt_boundary_mask + 1
7108bc2f7c6SEric Biggers		bytes.
7118bc2f7c6SEric Biggers
7128bc2f7c6SEric Biggers
713849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/wbt_lat_usec
714849ab826SEric BiggersDate:		November 2016
715849ab826SEric BiggersContact:	linux-block@vger.kernel.org
716849ab826SEric BiggersDescription:
717849ab826SEric Biggers		[RW] If the device is registered for writeback throttling, then
718849ab826SEric Biggers		this file shows the target minimum read latency. If this latency
719849ab826SEric Biggers		is exceeded in a given window of time (see wb_window_usec), then
720849ab826SEric Biggers		the writeback throttling will start scaling back writes. Writing
721849ab826SEric Biggers		a value of '0' to this file disables the feature. Writing a
722849ab826SEric Biggers		value of '-1' to this file resets the value to the default
723849ab826SEric Biggers		setting.
724849ab826SEric Biggers
725849ab826SEric Biggers
726849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/write_cache
727849ab826SEric BiggersDate:		April 2016
728849ab826SEric BiggersContact:	linux-block@vger.kernel.org
729849ab826SEric BiggersDescription:
730849ab826SEric Biggers		[RW] When read, this file will display whether the device has
731849ab826SEric Biggers		write back caching enabled or not. It will return "write back"
732849ab826SEric Biggers		for the former case, and "write through" for the latter. Writing
733849ab826SEric Biggers		to this file can change the kernels view of the device, but it
734849ab826SEric Biggers		doesn't alter the device state. This means that it might not be
735849ab826SEric Biggers		safe to toggle the setting from "write back" to "write through",
736849ab826SEric Biggers		since that will also eliminate cache flushes issued by the
737849ab826SEric Biggers		kernel.
73807c9093cSEric Biggers
73907c9093cSEric Biggers
74007c9093cSEric BiggersWhat:		/sys/block/<disk>/queue/write_same_max_bytes
74107c9093cSEric BiggersDate:		January 2012
74207c9093cSEric BiggersContact:	Martin K. Petersen <martin.petersen@oracle.com>
74307c9093cSEric BiggersDescription:
744849ab826SEric Biggers		[RO] Some devices support a write same operation in which a
74507c9093cSEric Biggers		single data block can be written to a range of several
746849ab826SEric Biggers		contiguous blocks on storage. This can be used to wipe areas on
747849ab826SEric Biggers		disk or to initialize drives in a RAID configuration.
748849ab826SEric Biggers		write_same_max_bytes indicates how many bytes can be written in
749849ab826SEric Biggers		a single write same command. If write_same_max_bytes is 0, write
750849ab826SEric Biggers		same is not supported by the device.
75107c9093cSEric Biggers
75207c9093cSEric Biggers
75307c9093cSEric BiggersWhat:		/sys/block/<disk>/queue/write_zeroes_max_bytes
75407c9093cSEric BiggersDate:		November 2016
75507c9093cSEric BiggersContact:	Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
75607c9093cSEric BiggersDescription:
757849ab826SEric Biggers		[RO] Devices that support write zeroes operation in which a
758849ab826SEric Biggers		single request can be issued to zero out the range of contiguous
759849ab826SEric Biggers		blocks on storage without having any payload in the request.
760849ab826SEric Biggers		This can be used to optimize writing zeroes to the devices.
761849ab826SEric Biggers		write_zeroes_max_bytes indicates how many bytes can be written
762849ab826SEric Biggers		in a single write zeroes command. If write_zeroes_max_bytes is
763849ab826SEric Biggers		0, write zeroes is not supported by the device.
764849ab826SEric Biggers
765849ab826SEric Biggers
766849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/zone_append_max_bytes
767849ab826SEric BiggersDate:		May 2020
768849ab826SEric BiggersContact:	linux-block@vger.kernel.org
769849ab826SEric BiggersDescription:
770849ab826SEric Biggers		[RO] This is the maximum number of bytes that can be written to
771849ab826SEric Biggers		a sequential zone of a zoned block device using a zone append
772849ab826SEric Biggers		write operation (REQ_OP_ZONE_APPEND). This value is always 0 for
773849ab826SEric Biggers		regular block devices.
774849ab826SEric Biggers
775849ab826SEric Biggers
776849ab826SEric BiggersWhat:		/sys/block/<disk>/queue/zone_write_granularity
777849ab826SEric BiggersDate:		January 2021
778849ab826SEric BiggersContact:	linux-block@vger.kernel.org
779849ab826SEric BiggersDescription:
780849ab826SEric Biggers		[RO] This indicates the alignment constraint, in bytes, for
781849ab826SEric Biggers		write operations in sequential zones of zoned block devices
782849ab826SEric Biggers		(devices with a zoned attributed that reports "host-managed" or
783849ab826SEric Biggers		"host-aware"). This value is always 0 for regular block devices.
78407c9093cSEric Biggers
78507c9093cSEric Biggers
78607c9093cSEric BiggersWhat:		/sys/block/<disk>/queue/zoned
78707c9093cSEric BiggersDate:		September 2016
78807c9093cSEric BiggersContact:	Damien Le Moal <damien.lemoal@wdc.com>
78907c9093cSEric BiggersDescription:
790849ab826SEric Biggers		[RO] zoned indicates if the device is a zoned block device and
791849ab826SEric Biggers		the zone model of the device if it is indeed zoned.  The
792849ab826SEric Biggers		possible values indicated by zoned are "none" for regular block
793849ab826SEric Biggers		devices and "host-aware" or "host-managed" for zoned block
794849ab826SEric Biggers		devices. The characteristics of host-aware and host-managed
795849ab826SEric Biggers		zoned block devices are described in the ZBC (Zoned Block
796849ab826SEric Biggers		Commands) and ZAC (Zoned Device ATA Command Set) standards.
797849ab826SEric Biggers		These standards also define the "drive-managed" zone model.
798849ab826SEric Biggers		However, since drive-managed zoned block devices do not support
799849ab826SEric Biggers		zone commands, they will be treated as regular block devices and
800849ab826SEric Biggers		zoned will report "none".
80107c9093cSEric Biggers
80207c9093cSEric Biggers
803e3306221SSagi GrimbergWhat:		/sys/block/<disk>/hidden
804e3306221SSagi GrimbergDate:		March 2023
805e3306221SSagi GrimbergContact:	linux-block@vger.kernel.org
806e3306221SSagi GrimbergDescription:
807e3306221SSagi Grimberg		[RO] the block device is hidden. it doesn’t produce events, and
808e3306221SSagi Grimberg		can’t be opened from userspace or using blkdev_get*.
809e3306221SSagi Grimberg		Used for the underlying components of multipath devices.
810e3306221SSagi Grimberg
811e3306221SSagi Grimberg
812ae7a7a53SEric BiggersWhat:		/sys/block/<disk>/stat
813ae7a7a53SEric BiggersDate:		February 2008
814ae7a7a53SEric BiggersContact:	Jerome Marchand <jmarchan@redhat.com>
815ae7a7a53SEric BiggersDescription:
816ae7a7a53SEric Biggers		The /sys/block/<disk>/stat files displays the I/O
817ae7a7a53SEric Biggers		statistics of disk <disk>. They contain 11 fields:
818ae7a7a53SEric Biggers
819ae7a7a53SEric Biggers		==  ==============================================
820ae7a7a53SEric Biggers		 1  reads completed successfully
821ae7a7a53SEric Biggers		 2  reads merged
822ae7a7a53SEric Biggers		 3  sectors read
823ae7a7a53SEric Biggers		 4  time spent reading (ms)
824ae7a7a53SEric Biggers		 5  writes completed
825ae7a7a53SEric Biggers		 6  writes merged
826ae7a7a53SEric Biggers		 7  sectors written
827ae7a7a53SEric Biggers		 8  time spent writing (ms)
828ae7a7a53SEric Biggers		 9  I/Os currently in progress
829ae7a7a53SEric Biggers		10  time spent doing I/Os (ms)
830ae7a7a53SEric Biggers		11  weighted time spent doing I/Os (ms)
831ae7a7a53SEric Biggers		12  discards completed
832ae7a7a53SEric Biggers		13  discards merged
833ae7a7a53SEric Biggers		14  sectors discarded
834ae7a7a53SEric Biggers		15  time spent discarding (ms)
835ae7a7a53SEric Biggers		16  flush requests completed
836ae7a7a53SEric Biggers		17  time spent flushing (ms)
837ae7a7a53SEric Biggers		==  ==============================================
838ae7a7a53SEric Biggers
839ae7a7a53SEric Biggers		For more details refer Documentation/admin-guide/iostats.rst
840