0001 What: /sys/block/<disk>/alignment_offset
0002 Date: April 2009
0003 Contact: Martin K. Petersen <martin.petersen@oracle.com>
0004 Description:
0005 Storage devices may report a physical block size that is
0006 bigger than the logical block size (for instance a drive
0007 with 4KB physical sectors exposing 512-byte logical
0008 blocks to the operating system). This parameter
0009 indicates how many bytes the beginning of the device is
0010 offset from the disk's natural alignment.
0011
0012
0013 What: /sys/block/<disk>/discard_alignment
0014 Date: May 2011
0015 Contact: Martin K. Petersen <martin.petersen@oracle.com>
0016 Description:
0017 Devices that support discard functionality may
0018 internally allocate space in units that are bigger than
0019 the exported logical block size. The discard_alignment
0020 parameter indicates how many bytes the beginning of the
0021 device is offset from the internal allocation unit's
0022 natural alignment.
0023
0024
0025 What: /sys/block/<disk>/diskseq
0026 Date: February 2021
0027 Contact: Matteo Croce <mcroce@microsoft.com>
0028 Description:
0029 The /sys/block/<disk>/diskseq files reports the disk
0030 sequence number, which is a monotonically increasing
0031 number assigned to every drive.
0032 Some devices, like the loop device, refresh such number
0033 every time the backing file is changed.
0034 The value type is 64 bit unsigned.
0035
0036
0037 What: /sys/block/<disk>/inflight
0038 Date: October 2009
0039 Contact: Jens Axboe <axboe@kernel.dk>, Nikanth Karthikesan <knikanth@suse.de>
0040 Description:
0041 Reports the number of I/O requests currently in progress
0042 (pending / in flight) in a device driver. This can be less
0043 than the number of requests queued in the block device queue.
0044 The report contains 2 fields: one for read requests
0045 and one for write requests.
0046 The value type is unsigned int.
0047 Cf. Documentation/block/stat.rst which contains a single value for
0048 requests in flight.
0049 This is related to /sys/block/<disk>/queue/nr_requests
0050 and for SCSI device also its queue_depth.
0051
0052
0053 What: /sys/block/<disk>/integrity/device_is_integrity_capable
0054 Date: July 2014
0055 Contact: Martin K. Petersen <martin.petersen@oracle.com>
0056 Description:
0057 Indicates whether a storage device is capable of storing
0058 integrity metadata. Set if the device is T10 PI-capable.
0059
0060
0061 What: /sys/block/<disk>/integrity/format
0062 Date: June 2008
0063 Contact: Martin K. Petersen <martin.petersen@oracle.com>
0064 Description:
0065 Metadata format for integrity capable block device.
0066 E.g. T10-DIF-TYPE1-CRC.
0067
0068
0069 What: /sys/block/<disk>/integrity/protection_interval_bytes
0070 Date: July 2015
0071 Contact: Martin K. Petersen <martin.petersen@oracle.com>
0072 Description:
0073 Describes the number of data bytes which are protected
0074 by one integrity tuple. Typically the device's logical
0075 block size.
0076
0077
0078 What: /sys/block/<disk>/integrity/read_verify
0079 Date: June 2008
0080 Contact: Martin K. Petersen <martin.petersen@oracle.com>
0081 Description:
0082 Indicates whether the block layer should verify the
0083 integrity of read requests serviced by devices that
0084 support sending integrity metadata.
0085
0086
0087 What: /sys/block/<disk>/integrity/tag_size
0088 Date: June 2008
0089 Contact: Martin K. Petersen <martin.petersen@oracle.com>
0090 Description:
0091 Number of bytes of integrity tag space available per
0092 512 bytes of data.
0093
0094
0095 What: /sys/block/<disk>/integrity/write_generate
0096 Date: June 2008
0097 Contact: Martin K. Petersen <martin.petersen@oracle.com>
0098 Description:
0099 Indicates whether the block layer should automatically
0100 generate checksums for write requests bound for
0101 devices that support receiving integrity metadata.
0102
0103
0104 What: /sys/block/<disk>/<partition>/alignment_offset
0105 Date: April 2009
0106 Contact: Martin K. Petersen <martin.petersen@oracle.com>
0107 Description:
0108 Storage devices may report a physical block size that is
0109 bigger than the logical block size (for instance a drive
0110 with 4KB physical sectors exposing 512-byte logical
0111 blocks to the operating system). This parameter
0112 indicates how many bytes the beginning of the partition
0113 is offset from the disk's natural alignment.
0114
0115
0116 What: /sys/block/<disk>/<partition>/discard_alignment
0117 Date: May 2011
0118 Contact: Martin K. Petersen <martin.petersen@oracle.com>
0119 Description:
0120 Devices that support discard functionality may
0121 internally allocate space in units that are bigger than
0122 the exported logical block size. The discard_alignment
0123 parameter indicates how many bytes the beginning of the
0124 partition is offset from the internal allocation unit's
0125 natural alignment.
0126
0127
0128 What: /sys/block/<disk>/<partition>/stat
0129 Date: February 2008
0130 Contact: Jerome Marchand <jmarchan@redhat.com>
0131 Description:
0132 The /sys/block/<disk>/<partition>/stat files display the
0133 I/O statistics of partition <partition>. The format is the
0134 same as the format of /sys/block/<disk>/stat.
0135
0136
0137 What: /sys/block/<disk>/queue/add_random
0138 Date: June 2010
0139 Contact: linux-block@vger.kernel.org
0140 Description:
0141 [RW] This file allows to turn off the disk entropy contribution.
0142 Default value of this file is '1'(on).
0143
0144
0145 What: /sys/block/<disk>/queue/chunk_sectors
0146 Date: September 2016
0147 Contact: Hannes Reinecke <hare@suse.com>
0148 Description:
0149 [RO] chunk_sectors has different meaning depending on the type
0150 of the disk. For a RAID device (dm-raid), chunk_sectors
0151 indicates the size in 512B sectors of the RAID volume stripe
0152 segment. For a zoned block device, either host-aware or
0153 host-managed, chunk_sectors indicates the size in 512B sectors
0154 of the zones of the device, with the eventual exception of the
0155 last zone of the device which may be smaller.
0156
0157
0158 What: /sys/block/<disk>/queue/crypto/
0159 Date: February 2022
0160 Contact: linux-block@vger.kernel.org
0161 Description:
0162 The presence of this subdirectory of /sys/block/<disk>/queue/
0163 indicates that the device supports inline encryption. This
0164 subdirectory contains files which describe the inline encryption
0165 capabilities of the device. For more information about inline
0166 encryption, refer to Documentation/block/inline-encryption.rst.
0167
0168
0169 What: /sys/block/<disk>/queue/crypto/max_dun_bits
0170 Date: February 2022
0171 Contact: linux-block@vger.kernel.org
0172 Description:
0173 [RO] This file shows the maximum length, in bits, of data unit
0174 numbers accepted by the device in inline encryption requests.
0175
0176
0177 What: /sys/block/<disk>/queue/crypto/modes/<mode>
0178 Date: February 2022
0179 Contact: linux-block@vger.kernel.org
0180 Description:
0181 [RO] For each crypto mode (i.e., encryption/decryption
0182 algorithm) the device supports with inline encryption, a file
0183 will exist at this location. It will contain a hexadecimal
0184 number that is a bitmask of the supported data unit sizes, in
0185 bytes, for that crypto mode.
0186
0187 Currently, the crypto modes that may be supported are:
0188
0189 * AES-256-XTS
0190 * AES-128-CBC-ESSIV
0191 * Adiantum
0192
0193 For example, if a device supports AES-256-XTS inline encryption
0194 with data unit sizes of 512 and 4096 bytes, the file
0195 /sys/block/<disk>/queue/crypto/modes/AES-256-XTS will exist and
0196 will contain "0x1200".
0197
0198
0199 What: /sys/block/<disk>/queue/crypto/num_keyslots
0200 Date: February 2022
0201 Contact: linux-block@vger.kernel.org
0202 Description:
0203 [RO] This file shows the number of keyslots the device has for
0204 use with inline encryption.
0205
0206
0207 What: /sys/block/<disk>/queue/dax
0208 Date: June 2016
0209 Contact: linux-block@vger.kernel.org
0210 Description:
0211 [RO] This file indicates whether the device supports Direct
0212 Access (DAX), used by CPU-addressable storage to bypass the
0213 pagecache. It shows '1' if true, '0' if not.
0214
0215
0216 What: /sys/block/<disk>/queue/discard_granularity
0217 Date: May 2011
0218 Contact: Martin K. Petersen <martin.petersen@oracle.com>
0219 Description:
0220 [RO] Devices that support discard functionality may internally
0221 allocate space using units that are bigger than the logical
0222 block size. The discard_granularity parameter indicates the size
0223 of the internal allocation unit in bytes if reported by the
0224 device. Otherwise the discard_granularity will be set to match
0225 the device's physical block size. A discard_granularity of 0
0226 means that the device does not support discard functionality.
0227
0228
0229 What: /sys/block/<disk>/queue/discard_max_bytes
0230 Date: May 2011
0231 Contact: Martin K. Petersen <martin.petersen@oracle.com>
0232 Description:
0233 [RW] While discard_max_hw_bytes is the hardware limit for the
0234 device, this setting is the software limit. Some devices exhibit
0235 large latencies when large discards are issued, setting this
0236 value lower will make Linux issue smaller discards and
0237 potentially help reduce latencies induced by large discard
0238 operations.
0239
0240
0241 What: /sys/block/<disk>/queue/discard_max_hw_bytes
0242 Date: July 2015
0243 Contact: linux-block@vger.kernel.org
0244 Description:
0245 [RO] Devices that support discard functionality may have
0246 internal limits on the number of bytes that can be trimmed or
0247 unmapped in a single operation. The `discard_max_hw_bytes`
0248 parameter is set by the device driver to the maximum number of
0249 bytes that can be discarded in a single operation. Discard
0250 requests issued to the device must not exceed this limit. A
0251 `discard_max_hw_bytes` value of 0 means that the device does not
0252 support discard functionality.
0253
0254
0255 What: /sys/block/<disk>/queue/discard_zeroes_data
0256 Date: May 2011
0257 Contact: Martin K. Petersen <martin.petersen@oracle.com>
0258 Description:
0259 [RO] Will always return 0. Don't rely on any specific behavior
0260 for discards, and don't read this file.
0261
0262
0263 What: /sys/block/<disk>/queue/dma_alignment
0264 Date: May 2022
0265 Contact: linux-block@vger.kernel.org
0266 Description:
0267 Reports the alignment that user space addresses must have to be
0268 used for raw block device access with O_DIRECT and other driver
0269 specific passthrough mechanisms.
0270
0271
0272 What: /sys/block/<disk>/queue/fua
0273 Date: May 2018
0274 Contact: linux-block@vger.kernel.org
0275 Description:
0276 [RO] Whether or not the block driver supports the FUA flag for
0277 write requests. FUA stands for Force Unit Access. If the FUA
0278 flag is set that means that write requests must bypass the
0279 volatile cache of the storage device.
0280
0281
0282 What: /sys/block/<disk>/queue/hw_sector_size
0283 Date: January 2008
0284 Contact: linux-block@vger.kernel.org
0285 Description:
0286 [RO] This is the hardware sector size of the device, in bytes.
0287
0288
0289 What: /sys/block/<disk>/queue/independent_access_ranges/
0290 Date: October 2021
0291 Contact: linux-block@vger.kernel.org
0292 Description:
0293 [RO] The presence of this sub-directory of the
0294 /sys/block/xxx/queue/ directory indicates that the device is
0295 capable of executing requests targeting different sector ranges
0296 in parallel. For instance, single LUN multi-actuator hard-disks
0297 will have an independent_access_ranges directory if the device
0298 correctly advertizes the sector ranges of its actuators.
0299
0300 The independent_access_ranges directory contains one directory
0301 per access range, with each range described using the sector
0302 (RO) attribute file to indicate the first sector of the range
0303 and the nr_sectors (RO) attribute file to indicate the total
0304 number of sectors in the range starting from the first sector of
0305 the range. For example, a dual-actuator hard-disk will have the
0306 following independent_access_ranges entries.::
0307
0308 $ tree /sys/block/<disk>/queue/independent_access_ranges/
0309 /sys/block/<disk>/queue/independent_access_ranges/
0310 |-- 0
0311 | |-- nr_sectors
0312 | `-- sector
0313 `-- 1
0314 |-- nr_sectors
0315 `-- sector
0316
0317 The sector and nr_sectors attributes use 512B sector unit,
0318 regardless of the actual block size of the device. Independent
0319 access ranges do not overlap and include all sectors within the
0320 device capacity. The access ranges are numbered in increasing
0321 order of the range start sector, that is, the sector attribute
0322 of range 0 always has the value 0.
0323
0324
0325 What: /sys/block/<disk>/queue/io_poll
0326 Date: November 2015
0327 Contact: linux-block@vger.kernel.org
0328 Description:
0329 [RW] When read, this file shows whether polling is enabled (1)
0330 or disabled (0). Writing '0' to this file will disable polling
0331 for this device. Writing any non-zero value will enable this
0332 feature.
0333
0334
0335 What: /sys/block/<disk>/queue/io_poll_delay
0336 Date: November 2016
0337 Contact: linux-block@vger.kernel.org
0338 Description:
0339 [RW] If polling is enabled, this controls what kind of polling
0340 will be performed. It defaults to -1, which is classic polling.
0341 In this mode, the CPU will repeatedly ask for completions
0342 without giving up any time. If set to 0, a hybrid polling mode
0343 is used, where the kernel will attempt to make an educated guess
0344 at when the IO will complete. Based on this guess, the kernel
0345 will put the process issuing IO to sleep for an amount of time,
0346 before entering a classic poll loop. This mode might be a little
0347 slower than pure classic polling, but it will be more efficient.
0348 If set to a value larger than 0, the kernel will put the process
0349 issuing IO to sleep for this amount of microseconds before
0350 entering classic polling.
0351
0352
0353 What: /sys/block/<disk>/queue/io_timeout
0354 Date: November 2018
0355 Contact: Weiping Zhang <zhangweiping@didiglobal.com>
0356 Description:
0357 [RW] io_timeout is the request timeout in milliseconds. If a
0358 request does not complete in this time then the block driver
0359 timeout handler is invoked. That timeout handler can decide to
0360 retry the request, to fail it or to start a device recovery
0361 strategy.
0362
0363
0364 What: /sys/block/<disk>/queue/iostats
0365 Date: January 2009
0366 Contact: linux-block@vger.kernel.org
0367 Description:
0368 [RW] This file is used to control (on/off) the iostats
0369 accounting of the disk.
0370
0371
0372 What: /sys/block/<disk>/queue/logical_block_size
0373 Date: May 2009
0374 Contact: Martin K. Petersen <martin.petersen@oracle.com>
0375 Description:
0376 [RO] This is the smallest unit the storage device can address.
0377 It is typically 512 bytes.
0378
0379
0380 What: /sys/block/<disk>/queue/max_active_zones
0381 Date: July 2020
0382 Contact: Niklas Cassel <niklas.cassel@wdc.com>
0383 Description:
0384 [RO] For zoned block devices (zoned attribute indicating
0385 "host-managed" or "host-aware"), the sum of zones belonging to
0386 any of the zone states: EXPLICIT OPEN, IMPLICIT OPEN or CLOSED,
0387 is limited by this value. If this value is 0, there is no limit.
0388
0389 If the host attempts to exceed this limit, the driver should
0390 report this error with BLK_STS_ZONE_ACTIVE_RESOURCE, which user
0391 space may see as the EOVERFLOW errno.
0392
0393
0394 What: /sys/block/<disk>/queue/max_discard_segments
0395 Date: February 2017
0396 Contact: linux-block@vger.kernel.org
0397 Description:
0398 [RO] The maximum number of DMA scatter/gather entries in a
0399 discard request.
0400
0401
0402 What: /sys/block/<disk>/queue/max_hw_sectors_kb
0403 Date: September 2004
0404 Contact: linux-block@vger.kernel.org
0405 Description:
0406 [RO] This is the maximum number of kilobytes supported in a
0407 single data transfer.
0408
0409
0410 What: /sys/block/<disk>/queue/max_integrity_segments
0411 Date: September 2010
0412 Contact: linux-block@vger.kernel.org
0413 Description:
0414 [RO] Maximum number of elements in a DMA scatter/gather list
0415 with integrity data that will be submitted by the block layer
0416 core to the associated block driver.
0417
0418
0419 What: /sys/block/<disk>/queue/max_open_zones
0420 Date: July 2020
0421 Contact: Niklas Cassel <niklas.cassel@wdc.com>
0422 Description:
0423 [RO] For zoned block devices (zoned attribute indicating
0424 "host-managed" or "host-aware"), the sum of zones belonging to
0425 any of the zone states: EXPLICIT OPEN or IMPLICIT OPEN, is
0426 limited by this value. If this value is 0, there is no limit.
0427
0428
0429 What: /sys/block/<disk>/queue/max_sectors_kb
0430 Date: September 2004
0431 Contact: linux-block@vger.kernel.org
0432 Description:
0433 [RW] This is the maximum number of kilobytes that the block
0434 layer will allow for a filesystem request. Must be smaller than
0435 or equal to the maximum size allowed by the hardware.
0436
0437
0438 What: /sys/block/<disk>/queue/max_segment_size
0439 Date: March 2010
0440 Contact: linux-block@vger.kernel.org
0441 Description:
0442 [RO] Maximum size in bytes of a single element in a DMA
0443 scatter/gather list.
0444
0445
0446 What: /sys/block/<disk>/queue/max_segments
0447 Date: March 2010
0448 Contact: linux-block@vger.kernel.org
0449 Description:
0450 [RO] Maximum number of elements in a DMA scatter/gather list
0451 that is submitted to the associated block driver.
0452
0453
0454 What: /sys/block/<disk>/queue/minimum_io_size
0455 Date: April 2009
0456 Contact: Martin K. Petersen <martin.petersen@oracle.com>
0457 Description:
0458 [RO] Storage devices may report a granularity or preferred
0459 minimum I/O size which is the smallest request the device can
0460 perform without incurring a performance penalty. For disk
0461 drives this is often the physical block size. For RAID arrays
0462 it is often the stripe chunk size. A properly aligned multiple
0463 of minimum_io_size is the preferred request size for workloads
0464 where a high number of I/O operations is desired.
0465
0466
0467 What: /sys/block/<disk>/queue/nomerges
0468 Date: January 2010
0469 Contact: linux-block@vger.kernel.org
0470 Description:
0471 [RW] Standard I/O elevator operations include attempts to merge
0472 contiguous I/Os. For known random I/O loads these attempts will
0473 always fail and result in extra cycles being spent in the
0474 kernel. This allows one to turn off this behavior on one of two
0475 ways: When set to 1, complex merge checks are disabled, but the
0476 simple one-shot merges with the previous I/O request are
0477 enabled. When set to 2, all merge tries are disabled. The
0478 default value is 0 - which enables all types of merge tries.
0479
0480
0481 What: /sys/block/<disk>/queue/nr_requests
0482 Date: July 2003
0483 Contact: linux-block@vger.kernel.org
0484 Description:
0485 [RW] This controls how many requests may be allocated in the
0486 block layer for read or write requests. Note that the total
0487 allocated number may be twice this amount, since it applies only
0488 to reads or writes (not the accumulated sum).
0489
0490 To avoid priority inversion through request starvation, a
0491 request queue maintains a separate request pool per each cgroup
0492 when CONFIG_BLK_CGROUP is enabled, and this parameter applies to
0493 each such per-block-cgroup request pool. IOW, if there are N
0494 block cgroups, each request queue may have up to N request
0495 pools, each independently regulated by nr_requests.
0496
0497
0498 What: /sys/block/<disk>/queue/nr_zones
0499 Date: November 2018
0500 Contact: Damien Le Moal <damien.lemoal@wdc.com>
0501 Description:
0502 [RO] nr_zones indicates the total number of zones of a zoned
0503 block device ("host-aware" or "host-managed" zone model). For
0504 regular block devices, the value is always 0.
0505
0506
0507 What: /sys/block/<disk>/queue/optimal_io_size
0508 Date: April 2009
0509 Contact: Martin K. Petersen <martin.petersen@oracle.com>
0510 Description:
0511 [RO] Storage devices may report an optimal I/O size, which is
0512 the device's preferred unit for sustained I/O. This is rarely
0513 reported for disk drives. For RAID arrays it is usually the
0514 stripe width or the internal track size. A properly aligned
0515 multiple of optimal_io_size is the preferred request size for
0516 workloads where sustained throughput is desired. If no optimal
0517 I/O size is reported this file contains 0.
0518
0519
0520 What: /sys/block/<disk>/queue/physical_block_size
0521 Date: May 2009
0522 Contact: Martin K. Petersen <martin.petersen@oracle.com>
0523 Description:
0524 [RO] This is the smallest unit a physical storage device can
0525 write atomically. It is usually the same as the logical block
0526 size but may be bigger. One example is SATA drives with 4KB
0527 sectors that expose a 512-byte logical block size to the
0528 operating system. For stacked block devices the
0529 physical_block_size variable contains the maximum
0530 physical_block_size of the component devices.
0531
0532
0533 What: /sys/block/<disk>/queue/read_ahead_kb
0534 Date: May 2004
0535 Contact: linux-block@vger.kernel.org
0536 Description:
0537 [RW] Maximum number of kilobytes to read-ahead for filesystems
0538 on this block device.
0539
0540
0541 What: /sys/block/<disk>/queue/rotational
0542 Date: January 2009
0543 Contact: linux-block@vger.kernel.org
0544 Description:
0545 [RW] This file is used to stat if the device is of rotational
0546 type or non-rotational type.
0547
0548
0549 What: /sys/block/<disk>/queue/rq_affinity
0550 Date: September 2008
0551 Contact: linux-block@vger.kernel.org
0552 Description:
0553 [RW] If this option is '1', the block layer will migrate request
0554 completions to the cpu "group" that originally submitted the
0555 request. For some workloads this provides a significant
0556 reduction in CPU cycles due to caching effects.
0557
0558 For storage configurations that need to maximize distribution of
0559 completion processing setting this option to '2' forces the
0560 completion to run on the requesting cpu (bypassing the "group"
0561 aggregation logic).
0562
0563
0564 What: /sys/block/<disk>/queue/scheduler
0565 Date: October 2004
0566 Contact: linux-block@vger.kernel.org
0567 Description:
0568 [RW] When read, this file will display the current and available
0569 IO schedulers for this block device. The currently active IO
0570 scheduler will be enclosed in [] brackets. Writing an IO
0571 scheduler name to this file will switch control of this block
0572 device to that new IO scheduler. Note that writing an IO
0573 scheduler name to this file will attempt to load that IO
0574 scheduler module, if it isn't already present in the system.
0575
0576
0577 What: /sys/block/<disk>/queue/stable_writes
0578 Date: September 2020
0579 Contact: linux-block@vger.kernel.org
0580 Description:
0581 [RW] This file will contain '1' if memory must not be modified
0582 while it is being used in a write request to this device. When
0583 this is the case and the kernel is performing writeback of a
0584 page, the kernel will wait for writeback to complete before
0585 allowing the page to be modified again, rather than allowing
0586 immediate modification as is normally the case. This
0587 restriction arises when the device accesses the memory multiple
0588 times where the same data must be seen every time -- for
0589 example, once to calculate a checksum and once to actually write
0590 the data. If no such restriction exists, this file will contain
0591 '0'. This file is writable for testing purposes.
0592
0593
0594 What: /sys/block/<disk>/queue/throttle_sample_time
0595 Date: March 2017
0596 Contact: linux-block@vger.kernel.org
0597 Description:
0598 [RW] This is the time window that blk-throttle samples data, in
0599 millisecond. blk-throttle makes decision based on the
0600 samplings. Lower time means cgroups have more smooth throughput,
0601 but higher CPU overhead. This exists only when
0602 CONFIG_BLK_DEV_THROTTLING_LOW is enabled.
0603
0604
0605 What: /sys/block/<disk>/queue/virt_boundary_mask
0606 Date: April 2021
0607 Contact: linux-block@vger.kernel.org
0608 Description:
0609 [RO] This file shows the I/O segment memory alignment mask for
0610 the block device. I/O requests to this device will be split
0611 between segments wherever either the memory address of the end
0612 of the previous segment or the memory address of the beginning
0613 of the current segment is not aligned to virt_boundary_mask + 1
0614 bytes.
0615
0616
0617 What: /sys/block/<disk>/queue/wbt_lat_usec
0618 Date: November 2016
0619 Contact: linux-block@vger.kernel.org
0620 Description:
0621 [RW] If the device is registered for writeback throttling, then
0622 this file shows the target minimum read latency. If this latency
0623 is exceeded in a given window of time (see wb_window_usec), then
0624 the writeback throttling will start scaling back writes. Writing
0625 a value of '0' to this file disables the feature. Writing a
0626 value of '-1' to this file resets the value to the default
0627 setting.
0628
0629
0630 What: /sys/block/<disk>/queue/write_cache
0631 Date: April 2016
0632 Contact: linux-block@vger.kernel.org
0633 Description:
0634 [RW] When read, this file will display whether the device has
0635 write back caching enabled or not. It will return "write back"
0636 for the former case, and "write through" for the latter. Writing
0637 to this file can change the kernels view of the device, but it
0638 doesn't alter the device state. This means that it might not be
0639 safe to toggle the setting from "write back" to "write through",
0640 since that will also eliminate cache flushes issued by the
0641 kernel.
0642
0643
0644 What: /sys/block/<disk>/queue/write_same_max_bytes
0645 Date: January 2012
0646 Contact: Martin K. Petersen <martin.petersen@oracle.com>
0647 Description:
0648 [RO] Some devices support a write same operation in which a
0649 single data block can be written to a range of several
0650 contiguous blocks on storage. This can be used to wipe areas on
0651 disk or to initialize drives in a RAID configuration.
0652 write_same_max_bytes indicates how many bytes can be written in
0653 a single write same command. If write_same_max_bytes is 0, write
0654 same is not supported by the device.
0655
0656
0657 What: /sys/block/<disk>/queue/write_zeroes_max_bytes
0658 Date: November 2016
0659 Contact: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
0660 Description:
0661 [RO] Devices that support write zeroes operation in which a
0662 single request can be issued to zero out the range of contiguous
0663 blocks on storage without having any payload in the request.
0664 This can be used to optimize writing zeroes to the devices.
0665 write_zeroes_max_bytes indicates how many bytes can be written
0666 in a single write zeroes command. If write_zeroes_max_bytes is
0667 0, write zeroes is not supported by the device.
0668
0669
0670 What: /sys/block/<disk>/queue/zone_append_max_bytes
0671 Date: May 2020
0672 Contact: linux-block@vger.kernel.org
0673 Description:
0674 [RO] This is the maximum number of bytes that can be written to
0675 a sequential zone of a zoned block device using a zone append
0676 write operation (REQ_OP_ZONE_APPEND). This value is always 0 for
0677 regular block devices.
0678
0679
0680 What: /sys/block/<disk>/queue/zone_write_granularity
0681 Date: January 2021
0682 Contact: linux-block@vger.kernel.org
0683 Description:
0684 [RO] This indicates the alignment constraint, in bytes, for
0685 write operations in sequential zones of zoned block devices
0686 (devices with a zoned attributed that reports "host-managed" or
0687 "host-aware"). This value is always 0 for regular block devices.
0688
0689
0690 What: /sys/block/<disk>/queue/zoned
0691 Date: September 2016
0692 Contact: Damien Le Moal <damien.lemoal@wdc.com>
0693 Description:
0694 [RO] zoned indicates if the device is a zoned block device and
0695 the zone model of the device if it is indeed zoned. The
0696 possible values indicated by zoned are "none" for regular block
0697 devices and "host-aware" or "host-managed" for zoned block
0698 devices. The characteristics of host-aware and host-managed
0699 zoned block devices are described in the ZBC (Zoned Block
0700 Commands) and ZAC (Zoned Device ATA Command Set) standards.
0701 These standards also define the "drive-managed" zone model.
0702 However, since drive-managed zoned block devices do not support
0703 zone commands, they will be treated as regular block devices and
0704 zoned will report "none".
0705
0706
0707 What: /sys/block/<disk>/stat
0708 Date: February 2008
0709 Contact: Jerome Marchand <jmarchan@redhat.com>
0710 Description:
0711 The /sys/block/<disk>/stat files displays the I/O
0712 statistics of disk <disk>. They contain 11 fields:
0713
0714 == ==============================================
0715 1 reads completed successfully
0716 2 reads merged
0717 3 sectors read
0718 4 time spent reading (ms)
0719 5 writes completed
0720 6 writes merged
0721 7 sectors written
0722 8 time spent writing (ms)
0723 9 I/Os currently in progress
0724 10 time spent doing I/Os (ms)
0725 11 weighted time spent doing I/Os (ms)
0726 12 discards completed
0727 13 discards merged
0728 14 sectors discarded
0729 15 time spent discarding (ms)
0730 16 flush requests completed
0731 17 time spent flushing (ms)
0732 == ==============================================
0733
0734 For more details refer Documentation/admin-guide/iostats.rst