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