sysfs-block 26 KB

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