sysfs-block 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791
  1. What: /sys/block/<disk>/alignment_offset
  2. Date: April 2009
  3. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  4. Description:
  5. Storage devices may report a physical block size that is
  6. bigger than the logical block size (for instance a drive
  7. with 4KB physical sectors exposing 512-byte logical
  8. blocks to the operating system). This parameter
  9. indicates how many bytes the beginning of the device is
  10. offset from the disk's natural alignment.
  11. What: /sys/block/<disk>/discard_alignment
  12. Date: May 2011
  13. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  14. Description:
  15. Devices that support discard functionality may
  16. internally allocate space in units that are bigger than
  17. the exported logical block size. The discard_alignment
  18. parameter indicates how many bytes the beginning of the
  19. device is offset from the internal allocation unit's
  20. natural alignment.
  21. What: /sys/block/<disk>/atomic_write_max_bytes
  22. Date: February 2024
  23. Contact: Himanshu Madhani <himanshu.madhani@oracle.com>
  24. Description:
  25. [RO] This parameter specifies the maximum atomic write
  26. size reported by the device. This parameter is relevant
  27. for merging of writes, where a merged atomic write
  28. operation must not exceed this number of bytes.
  29. This parameter may be greater than the value in
  30. atomic_write_unit_max_bytes as
  31. atomic_write_unit_max_bytes will be rounded down to a
  32. power-of-two and atomic_write_unit_max_bytes may also be
  33. limited by some other queue limits, such as max_segments.
  34. This parameter - along with atomic_write_unit_min_bytes
  35. and atomic_write_unit_max_bytes - will not be larger than
  36. max_hw_sectors_kb, but may be larger than max_sectors_kb.
  37. What: /sys/block/<disk>/atomic_write_unit_min_bytes
  38. Date: February 2024
  39. Contact: Himanshu Madhani <himanshu.madhani@oracle.com>
  40. Description:
  41. [RO] This parameter specifies the smallest block which can
  42. be written atomically with an atomic write operation. All
  43. atomic write operations must begin at a
  44. atomic_write_unit_min boundary and must be multiples of
  45. atomic_write_unit_min. This value must be a power-of-two.
  46. What: /sys/block/<disk>/atomic_write_unit_max_bytes
  47. Date: February 2024
  48. Contact: Himanshu Madhani <himanshu.madhani@oracle.com>
  49. Description:
  50. [RO] This parameter defines the largest block which can be
  51. written atomically with an atomic write operation. This
  52. value must be a multiple of atomic_write_unit_min and must
  53. be a power-of-two. This value will not be larger than
  54. atomic_write_max_bytes.
  55. What: /sys/block/<disk>/atomic_write_boundary_bytes
  56. Date: February 2024
  57. Contact: Himanshu Madhani <himanshu.madhani@oracle.com>
  58. Description:
  59. [RO] A device may need to internally split an atomic write I/O
  60. which straddles a given logical block address boundary. This
  61. parameter specifies the size in bytes of the atomic boundary if
  62. one is reported by the device. This value must be a
  63. power-of-two and at least the size as in
  64. atomic_write_unit_max_bytes.
  65. Any attempt to merge atomic write I/Os must not result in a
  66. merged I/O which crosses this boundary (if any).
  67. What: /sys/block/<disk>/diskseq
  68. Date: February 2021
  69. Contact: Matteo Croce <mcroce@microsoft.com>
  70. Description:
  71. The /sys/block/<disk>/diskseq files reports the disk
  72. sequence number, which is a monotonically increasing
  73. number assigned to every drive.
  74. Some devices, like the loop device, refresh such number
  75. every time the backing file is changed.
  76. The value type is 64 bit unsigned.
  77. What: /sys/block/<disk>/inflight
  78. Date: October 2009
  79. Contact: Jens Axboe <axboe@kernel.dk>, Nikanth Karthikesan <knikanth@suse.de>
  80. Description:
  81. Reports the number of I/O requests currently in progress
  82. (pending / in flight) in a device driver. This can be less
  83. than the number of requests queued in the block device queue.
  84. The report contains 2 fields: one for read requests
  85. and one for write requests.
  86. The value type is unsigned int.
  87. Cf. Documentation/block/stat.rst which contains a single value for
  88. requests in flight.
  89. This is related to /sys/block/<disk>/queue/nr_requests
  90. and for SCSI device also its queue_depth.
  91. What: /sys/block/<disk>/integrity/device_is_integrity_capable
  92. Date: July 2014
  93. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  94. Description:
  95. Indicates whether a storage device is capable of storing
  96. integrity metadata. Set if the device is T10 PI-capable.
  97. What: /sys/block/<disk>/integrity/format
  98. Date: June 2008
  99. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  100. Description:
  101. Metadata format for integrity capable block device.
  102. E.g. T10-DIF-TYPE1-CRC.
  103. What: /sys/block/<disk>/integrity/protection_interval_bytes
  104. Date: July 2015
  105. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  106. Description:
  107. Describes the number of data bytes which are protected
  108. by one integrity tuple. Typically the device's logical
  109. block size.
  110. What: /sys/block/<disk>/integrity/read_verify
  111. Date: June 2008
  112. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  113. Description:
  114. Indicates whether the block layer should verify the
  115. integrity of read requests serviced by devices that
  116. support sending integrity metadata.
  117. What: /sys/block/<disk>/integrity/tag_size
  118. Date: June 2008
  119. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  120. Description:
  121. Number of bytes of integrity tag space available per
  122. 512 bytes of data.
  123. What: /sys/block/<disk>/integrity/write_generate
  124. Date: June 2008
  125. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  126. Description:
  127. Indicates whether the block layer should automatically
  128. generate checksums for write requests bound for
  129. devices that support receiving integrity metadata.
  130. What: /sys/block/<disk>/partscan
  131. Date: May 2024
  132. Contact: Christoph Hellwig <hch@lst.de>
  133. Description:
  134. The /sys/block/<disk>/partscan files reports if partition
  135. scanning is enabled for the disk. It returns "1" if partition
  136. scanning is enabled, or "0" if not. The value type is a 32-bit
  137. unsigned integer, but only "0" and "1" are valid values.
  138. What: /sys/block/<disk>/<partition>/alignment_offset
  139. Date: April 2009
  140. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  141. Description:
  142. Storage devices may report a physical block size that is
  143. bigger than the logical block size (for instance a drive
  144. with 4KB physical sectors exposing 512-byte logical
  145. blocks to the operating system). This parameter
  146. indicates how many bytes the beginning of the partition
  147. is offset from the disk's natural alignment.
  148. What: /sys/block/<disk>/<partition>/discard_alignment
  149. Date: May 2011
  150. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  151. Description:
  152. Devices that support discard functionality may
  153. internally allocate space in units that are bigger than
  154. the exported logical block size. The discard_alignment
  155. parameter indicates how many bytes the beginning of the
  156. partition is offset from the internal allocation unit's
  157. natural alignment.
  158. What: /sys/block/<disk>/<partition>/stat
  159. Date: February 2008
  160. Contact: Jerome Marchand <jmarchan@redhat.com>
  161. Description:
  162. The /sys/block/<disk>/<partition>/stat files display the
  163. I/O statistics of partition <partition>. The format is the
  164. same as the format of /sys/block/<disk>/stat.
  165. What: /sys/block/<disk>/queue/add_random
  166. Date: June 2010
  167. Contact: linux-block@vger.kernel.org
  168. Description:
  169. [RW] This file allows to turn off the disk entropy contribution.
  170. Default value of this file is '1'(on).
  171. What: /sys/block/<disk>/queue/chunk_sectors
  172. Date: September 2016
  173. Contact: Hannes Reinecke <hare@suse.com>
  174. Description:
  175. [RO] chunk_sectors has different meaning depending on the type
  176. of the disk. For a RAID device (dm-raid), chunk_sectors
  177. indicates the size in 512B sectors of the RAID volume stripe
  178. segment. For a zoned block device, either host-aware or
  179. host-managed, chunk_sectors indicates the size in 512B sectors
  180. of the zones of the device, with the eventual exception of the
  181. last zone of the device which may be smaller.
  182. What: /sys/block/<disk>/queue/crypto/
  183. Date: February 2022
  184. Contact: linux-block@vger.kernel.org
  185. Description:
  186. The presence of this subdirectory of /sys/block/<disk>/queue/
  187. indicates that the device supports inline encryption. This
  188. subdirectory contains files which describe the inline encryption
  189. capabilities of the device. For more information about inline
  190. encryption, refer to Documentation/block/inline-encryption.rst.
  191. What: /sys/block/<disk>/queue/crypto/max_dun_bits
  192. Date: February 2022
  193. Contact: linux-block@vger.kernel.org
  194. Description:
  195. [RO] This file shows the maximum length, in bits, of data unit
  196. numbers accepted by the device in inline encryption requests.
  197. What: /sys/block/<disk>/queue/crypto/modes/<mode>
  198. Date: February 2022
  199. Contact: linux-block@vger.kernel.org
  200. Description:
  201. [RO] For each crypto mode (i.e., encryption/decryption
  202. algorithm) the device supports with inline encryption, a file
  203. will exist at this location. It will contain a hexadecimal
  204. number that is a bitmask of the supported data unit sizes, in
  205. bytes, for that crypto mode.
  206. Currently, the crypto modes that may be supported are:
  207. * AES-256-XTS
  208. * AES-128-CBC-ESSIV
  209. * Adiantum
  210. For example, if a device supports AES-256-XTS inline encryption
  211. with data unit sizes of 512 and 4096 bytes, the file
  212. /sys/block/<disk>/queue/crypto/modes/AES-256-XTS will exist and
  213. will contain "0x1200".
  214. What: /sys/block/<disk>/queue/crypto/num_keyslots
  215. Date: February 2022
  216. Contact: linux-block@vger.kernel.org
  217. Description:
  218. [RO] This file shows the number of keyslots the device has for
  219. use with inline encryption.
  220. What: /sys/block/<disk>/queue/dax
  221. Date: June 2016
  222. Contact: linux-block@vger.kernel.org
  223. Description:
  224. [RO] This file indicates whether the device supports Direct
  225. Access (DAX), used by CPU-addressable storage to bypass the
  226. pagecache. It shows '1' if true, '0' if not.
  227. What: /sys/block/<disk>/queue/discard_granularity
  228. Date: May 2011
  229. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  230. Description:
  231. [RO] Devices that support discard functionality may internally
  232. allocate space using units that are bigger than the logical
  233. block size. The discard_granularity parameter indicates the size
  234. of the internal allocation unit in bytes if reported by the
  235. device. Otherwise the discard_granularity will be set to match
  236. the device's physical block size. A discard_granularity of 0
  237. means that the device does not support discard functionality.
  238. What: /sys/block/<disk>/queue/discard_max_bytes
  239. Date: May 2011
  240. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  241. Description:
  242. [RW] While discard_max_hw_bytes is the hardware limit for the
  243. device, this setting is the software limit. Some devices exhibit
  244. large latencies when large discards are issued, setting this
  245. value lower will make Linux issue smaller discards and
  246. potentially help reduce latencies induced by large discard
  247. operations.
  248. What: /sys/block/<disk>/queue/discard_max_hw_bytes
  249. Date: July 2015
  250. Contact: linux-block@vger.kernel.org
  251. Description:
  252. [RO] Devices that support discard functionality may have
  253. internal limits on the number of bytes that can be trimmed or
  254. unmapped in a single operation. The `discard_max_hw_bytes`
  255. parameter is set by the device driver to the maximum number of
  256. bytes that can be discarded in a single operation. Discard
  257. requests issued to the device must not exceed this limit. A
  258. `discard_max_hw_bytes` value of 0 means that the device does not
  259. support discard functionality.
  260. What: /sys/block/<disk>/queue/discard_zeroes_data
  261. Date: May 2011
  262. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  263. Description:
  264. [RO] Will always return 0. Don't rely on any specific behavior
  265. for discards, and don't read this file.
  266. What: /sys/block/<disk>/queue/dma_alignment
  267. Date: May 2022
  268. Contact: linux-block@vger.kernel.org
  269. Description:
  270. Reports the alignment that user space addresses must have to be
  271. used for raw block device access with O_DIRECT and other driver
  272. specific passthrough mechanisms.
  273. What: /sys/block/<disk>/queue/fua
  274. Date: May 2018
  275. Contact: linux-block@vger.kernel.org
  276. Description:
  277. [RO] Whether or not the block driver supports the FUA flag for
  278. write requests. FUA stands for Force Unit Access. If the FUA
  279. flag is set that means that write requests must bypass the
  280. volatile cache of the storage device.
  281. What: /sys/block/<disk>/queue/hw_sector_size
  282. Date: January 2008
  283. Contact: linux-block@vger.kernel.org
  284. Description:
  285. [RO] This is the hardware sector size of the device, in bytes.
  286. What: /sys/block/<disk>/queue/independent_access_ranges/
  287. Date: October 2021
  288. Contact: linux-block@vger.kernel.org
  289. Description:
  290. [RO] The presence of this sub-directory of the
  291. /sys/block/xxx/queue/ directory indicates that the device is
  292. capable of executing requests targeting different sector ranges
  293. in parallel. For instance, single LUN multi-actuator hard-disks
  294. will have an independent_access_ranges directory if the device
  295. correctly advertises the sector ranges of its actuators.
  296. The independent_access_ranges directory contains one directory
  297. per access range, with each range described using the sector
  298. (RO) attribute file to indicate the first sector of the range
  299. and the nr_sectors (RO) attribute file to indicate the total
  300. number of sectors in the range starting from the first sector of
  301. the range. For example, a dual-actuator hard-disk will have the
  302. following independent_access_ranges entries.::
  303. $ tree /sys/block/<disk>/queue/independent_access_ranges/
  304. /sys/block/<disk>/queue/independent_access_ranges/
  305. |-- 0
  306. | |-- nr_sectors
  307. | `-- sector
  308. `-- 1
  309. |-- nr_sectors
  310. `-- sector
  311. The sector and nr_sectors attributes use 512B sector unit,
  312. regardless of the actual block size of the device. Independent
  313. access ranges do not overlap and include all sectors within the
  314. device capacity. The access ranges are numbered in increasing
  315. order of the range start sector, that is, the sector attribute
  316. of range 0 always has the value 0.
  317. What: /sys/block/<disk>/queue/io_poll
  318. Date: November 2015
  319. Contact: linux-block@vger.kernel.org
  320. Description:
  321. [RW] When read, this file shows whether polling is enabled (1)
  322. or disabled (0). Writing '0' to this file will disable polling
  323. for this device. Writing any non-zero value will enable this
  324. feature.
  325. What: /sys/block/<disk>/queue/io_poll_delay
  326. Date: November 2016
  327. Contact: linux-block@vger.kernel.org
  328. Description:
  329. [RW] This was used to control what kind of polling will be
  330. performed. It is now fixed to -1, which is classic polling.
  331. In this mode, the CPU will repeatedly ask for completions
  332. without giving up any time.
  333. <deprecated>
  334. What: /sys/block/<disk>/queue/io_timeout
  335. Date: November 2018
  336. Contact: Weiping Zhang <zhangweiping@didiglobal.com>
  337. Description:
  338. [RW] io_timeout is the request timeout in milliseconds. If a
  339. request does not complete in this time then the block driver
  340. timeout handler is invoked. That timeout handler can decide to
  341. retry the request, to fail it or to start a device recovery
  342. strategy.
  343. What: /sys/block/<disk>/queue/iostats
  344. Date: January 2009
  345. Contact: linux-block@vger.kernel.org
  346. Description:
  347. [RW] This file is used to control (on/off) the iostats
  348. accounting of the disk.
  349. What: /sys/block/<disk>/queue/logical_block_size
  350. Date: May 2009
  351. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  352. Description:
  353. [RO] This is the smallest unit the storage device can address.
  354. It is typically 512 bytes.
  355. What: /sys/block/<disk>/queue/max_active_zones
  356. Date: July 2020
  357. Contact: Niklas Cassel <niklas.cassel@wdc.com>
  358. Description:
  359. [RO] For zoned block devices (zoned attribute indicating
  360. "host-managed" or "host-aware"), the sum of zones belonging to
  361. any of the zone states: EXPLICIT OPEN, IMPLICIT OPEN or CLOSED,
  362. is limited by this value. If this value is 0, there is no limit.
  363. If the host attempts to exceed this limit, the driver should
  364. report this error with BLK_STS_ZONE_ACTIVE_RESOURCE, which user
  365. space may see as the EOVERFLOW errno.
  366. What: /sys/block/<disk>/queue/max_discard_segments
  367. Date: February 2017
  368. Contact: linux-block@vger.kernel.org
  369. Description:
  370. [RO] The maximum number of DMA scatter/gather entries in a
  371. discard request.
  372. What: /sys/block/<disk>/queue/max_hw_sectors_kb
  373. Date: September 2004
  374. Contact: linux-block@vger.kernel.org
  375. Description:
  376. [RO] This is the maximum number of kilobytes supported in a
  377. single data transfer.
  378. What: /sys/block/<disk>/queue/max_integrity_segments
  379. Date: September 2010
  380. Contact: linux-block@vger.kernel.org
  381. Description:
  382. [RO] Maximum number of elements in a DMA scatter/gather list
  383. with integrity data that will be submitted by the block layer
  384. core to the associated block driver.
  385. What: /sys/block/<disk>/queue/max_open_zones
  386. Date: July 2020
  387. Contact: Niklas Cassel <niklas.cassel@wdc.com>
  388. Description:
  389. [RO] For zoned block devices (zoned attribute indicating
  390. "host-managed" or "host-aware"), the sum of zones belonging to
  391. any of the zone states: EXPLICIT OPEN or IMPLICIT OPEN, is
  392. limited by this value. If this value is 0, there is no limit.
  393. What: /sys/block/<disk>/queue/max_sectors_kb
  394. Date: September 2004
  395. Contact: linux-block@vger.kernel.org
  396. Description:
  397. [RW] This is the maximum number of kilobytes that the block
  398. layer will allow for a filesystem request. Must be smaller than
  399. or equal to the maximum size allowed by the hardware. Write 0
  400. to use default kernel settings.
  401. What: /sys/block/<disk>/queue/max_segment_size
  402. Date: March 2010
  403. Contact: linux-block@vger.kernel.org
  404. Description:
  405. [RO] Maximum size in bytes of a single element in a DMA
  406. scatter/gather list.
  407. What: /sys/block/<disk>/queue/max_segments
  408. Date: March 2010
  409. Contact: linux-block@vger.kernel.org
  410. Description:
  411. [RO] Maximum number of elements in a DMA scatter/gather list
  412. that is submitted to the associated block driver.
  413. What: /sys/block/<disk>/queue/minimum_io_size
  414. Date: April 2009
  415. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  416. Description:
  417. [RO] Storage devices may report a granularity or preferred
  418. minimum I/O size which is the smallest request the device can
  419. perform without incurring a performance penalty. For disk
  420. drives this is often the physical block size. For RAID arrays
  421. it is often the stripe chunk size. A properly aligned multiple
  422. of minimum_io_size is the preferred request size for workloads
  423. where a high number of I/O operations is desired.
  424. What: /sys/block/<disk>/queue/nomerges
  425. Date: January 2010
  426. Contact: linux-block@vger.kernel.org
  427. Description:
  428. [RW] Standard I/O elevator operations include attempts to merge
  429. contiguous I/Os. For known random I/O loads these attempts will
  430. always fail and result in extra cycles being spent in the
  431. kernel. This allows one to turn off this behavior on one of two
  432. ways: When set to 1, complex merge checks are disabled, but the
  433. simple one-shot merges with the previous I/O request are
  434. enabled. When set to 2, all merge tries are disabled. The
  435. default value is 0 - which enables all types of merge tries.
  436. What: /sys/block/<disk>/queue/nr_requests
  437. Date: July 2003
  438. Contact: linux-block@vger.kernel.org
  439. Description:
  440. [RW] This controls how many requests may be allocated in the
  441. block layer for read or write requests. Note that the total
  442. allocated number may be twice this amount, since it applies only
  443. to reads or writes (not the accumulated sum).
  444. To avoid priority inversion through request starvation, a
  445. request queue maintains a separate request pool per each cgroup
  446. when CONFIG_BLK_CGROUP is enabled, and this parameter applies to
  447. each such per-block-cgroup request pool. IOW, if there are N
  448. block cgroups, each request queue may have up to N request
  449. pools, each independently regulated by nr_requests.
  450. What: /sys/block/<disk>/queue/nr_zones
  451. Date: November 2018
  452. Contact: Damien Le Moal <damien.lemoal@wdc.com>
  453. Description:
  454. [RO] nr_zones indicates the total number of zones of a zoned
  455. block device ("host-aware" or "host-managed" zone model). For
  456. regular block devices, the value is always 0.
  457. What: /sys/block/<disk>/queue/optimal_io_size
  458. Date: April 2009
  459. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  460. Description:
  461. [RO] Storage devices may report an optimal I/O size, which is
  462. the device's preferred unit for sustained I/O. This is rarely
  463. reported for disk drives. For RAID arrays it is usually the
  464. stripe width or the internal track size. A properly aligned
  465. multiple of optimal_io_size is the preferred request size for
  466. workloads where sustained throughput is desired. If no optimal
  467. I/O size is reported this file contains 0.
  468. What: /sys/block/<disk>/queue/physical_block_size
  469. Date: May 2009
  470. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  471. Description:
  472. [RO] This is the smallest unit a physical storage device can
  473. write atomically. It is usually the same as the logical block
  474. size but may be bigger. One example is SATA drives with 4KB
  475. sectors that expose a 512-byte logical block size to the
  476. operating system. For stacked block devices the
  477. physical_block_size variable contains the maximum
  478. physical_block_size of the component devices.
  479. What: /sys/block/<disk>/queue/read_ahead_kb
  480. Date: May 2004
  481. Contact: linux-block@vger.kernel.org
  482. Description:
  483. [RW] Maximum number of kilobytes to read-ahead for filesystems
  484. on this block device.
  485. For MADV_HUGEPAGE, the readahead size may exceed this setting
  486. since its granularity is based on the hugepage size.
  487. What: /sys/block/<disk>/queue/rotational
  488. Date: January 2009
  489. Contact: linux-block@vger.kernel.org
  490. Description:
  491. [RW] This file is used to stat if the device is of rotational
  492. type or non-rotational type.
  493. What: /sys/block/<disk>/queue/rq_affinity
  494. Date: September 2008
  495. Contact: linux-block@vger.kernel.org
  496. Description:
  497. [RW] If this option is '1', the block layer will migrate request
  498. completions to the cpu "group" that originally submitted the
  499. request. For some workloads this provides a significant
  500. reduction in CPU cycles due to caching effects.
  501. For storage configurations that need to maximize distribution of
  502. completion processing setting this option to '2' forces the
  503. completion to run on the requesting cpu (bypassing the "group"
  504. aggregation logic).
  505. What: /sys/block/<disk>/queue/scheduler
  506. Date: October 2004
  507. Contact: linux-block@vger.kernel.org
  508. Description:
  509. [RW] When read, this file will display the current and available
  510. IO schedulers for this block device. The currently active IO
  511. scheduler will be enclosed in [] brackets. Writing an IO
  512. scheduler name to this file will switch control of this block
  513. device to that new IO scheduler. Note that writing an IO
  514. scheduler name to this file will attempt to load that IO
  515. scheduler module, if it isn't already present in the system.
  516. What: /sys/block/<disk>/queue/stable_writes
  517. Date: September 2020
  518. Contact: linux-block@vger.kernel.org
  519. Description:
  520. [RW] This file will contain '1' if memory must not be modified
  521. while it is being used in a write request to this device. When
  522. this is the case and the kernel is performing writeback of a
  523. page, the kernel will wait for writeback to complete before
  524. allowing the page to be modified again, rather than allowing
  525. immediate modification as is normally the case. This
  526. restriction arises when the device accesses the memory multiple
  527. times where the same data must be seen every time -- for
  528. example, once to calculate a checksum and once to actually write
  529. the data. If no such restriction exists, this file will contain
  530. '0'. This file is writable for testing purposes.
  531. What: /sys/block/<disk>/queue/virt_boundary_mask
  532. Date: April 2021
  533. Contact: linux-block@vger.kernel.org
  534. Description:
  535. [RO] This file shows the I/O segment memory alignment mask for
  536. the block device. I/O requests to this device will be split
  537. between segments wherever either the memory address of the end
  538. of the previous segment or the memory address of the beginning
  539. of the current segment is not aligned to virt_boundary_mask + 1
  540. bytes.
  541. What: /sys/block/<disk>/queue/wbt_lat_usec
  542. Date: November 2016
  543. Contact: linux-block@vger.kernel.org
  544. Description:
  545. [RW] If the device is registered for writeback throttling, then
  546. this file shows the target minimum read latency. If this latency
  547. is exceeded in a given window of time (see wb_window_usec), then
  548. the writeback throttling will start scaling back writes. Writing
  549. a value of '0' to this file disables the feature. Writing a
  550. value of '-1' to this file resets the value to the default
  551. setting.
  552. What: /sys/block/<disk>/queue/write_cache
  553. Date: April 2016
  554. Contact: linux-block@vger.kernel.org
  555. Description:
  556. [RW] When read, this file will display whether the device has
  557. write back caching enabled or not. It will return "write back"
  558. for the former case, and "write through" for the latter. Writing
  559. to this file can change the kernels view of the device, but it
  560. doesn't alter the device state. This means that it might not be
  561. safe to toggle the setting from "write back" to "write through",
  562. since that will also eliminate cache flushes issued by the
  563. kernel.
  564. What: /sys/block/<disk>/queue/write_same_max_bytes
  565. Date: January 2012
  566. Contact: Martin K. Petersen <martin.petersen@oracle.com>
  567. Description:
  568. [RO] Some devices support a write same operation in which a
  569. single data block can be written to a range of several
  570. contiguous blocks on storage. This can be used to wipe areas on
  571. disk or to initialize drives in a RAID configuration.
  572. write_same_max_bytes indicates how many bytes can be written in
  573. a single write same command. If write_same_max_bytes is 0, write
  574. same is not supported by the device.
  575. What: /sys/block/<disk>/queue/write_zeroes_max_bytes
  576. Date: November 2016
  577. Contact: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
  578. Description:
  579. [RO] Devices that support write zeroes operation in which a
  580. single request can be issued to zero out the range of contiguous
  581. blocks on storage without having any payload in the request.
  582. This can be used to optimize writing zeroes to the devices.
  583. write_zeroes_max_bytes indicates how many bytes can be written
  584. in a single write zeroes command. If write_zeroes_max_bytes is
  585. 0, write zeroes is not supported by the device.
  586. What: /sys/block/<disk>/queue/zone_append_max_bytes
  587. Date: May 2020
  588. Contact: linux-block@vger.kernel.org
  589. Description:
  590. [RO] This is the maximum number of bytes that can be written to
  591. a sequential zone of a zoned block device using a zone append
  592. write operation (REQ_OP_ZONE_APPEND). This value is always 0 for
  593. regular block devices.
  594. What: /sys/block/<disk>/queue/zone_write_granularity
  595. Date: January 2021
  596. Contact: linux-block@vger.kernel.org
  597. Description:
  598. [RO] This indicates the alignment constraint, in bytes, for
  599. write operations in sequential zones of zoned block devices
  600. (devices with a zoned attributed that reports "host-managed" or
  601. "host-aware"). This value is always 0 for regular block devices.
  602. What: /sys/block/<disk>/queue/zoned
  603. Date: September 2016
  604. Contact: Damien Le Moal <damien.lemoal@wdc.com>
  605. Description:
  606. [RO] zoned indicates if the device is a zoned block device and
  607. the zone model of the device if it is indeed zoned. The
  608. possible values indicated by zoned are "none" for regular block
  609. devices and "host-aware" or "host-managed" for zoned block
  610. devices. The characteristics of host-aware and host-managed
  611. zoned block devices are described in the ZBC (Zoned Block
  612. Commands) and ZAC (Zoned Device ATA Command Set) standards.
  613. These standards also define the "drive-managed" zone model.
  614. However, since drive-managed zoned block devices do not support
  615. zone commands, they will be treated as regular block devices and
  616. zoned will report "none".
  617. What: /sys/block/<disk>/hidden
  618. Date: March 2023
  619. Contact: linux-block@vger.kernel.org
  620. Description:
  621. [RO] the block device is hidden. it doesn’t produce events, and
  622. can’t be opened from userspace or using blkdev_get*.
  623. Used for the underlying components of multipath devices.
  624. What: /sys/block/<disk>/stat
  625. Date: February 2008
  626. Contact: Jerome Marchand <jmarchan@redhat.com>
  627. Description:
  628. The /sys/block/<disk>/stat files displays the I/O
  629. statistics of disk <disk>. They contain 11 fields:
  630. == ==============================================
  631. 1 reads completed successfully
  632. 2 reads merged
  633. 3 sectors read
  634. 4 time spent reading (ms)
  635. 5 writes completed
  636. 6 writes merged
  637. 7 sectors written
  638. 8 time spent writing (ms)
  639. 9 I/Os currently in progress
  640. 10 time spent doing I/Os (ms)
  641. 11 weighted time spent doing I/Os (ms)
  642. 12 discards completed
  643. 13 discards merged
  644. 14 sectors discarded
  645. 15 time spent discarding (ms)
  646. 16 flush requests completed
  647. 17 time spent flushing (ms)
  648. == ==============================================
  649. For more details refer Documentation/admin-guide/iostats.rst