Skip to content

Commit fc22b34

Browse files
mbrozaxboe
authored andcommitted
docs: sysfs-block: Clarify integrity sysfs attributes
The /sys/block/<disk>/integrity fields are historically set if T10 protection Information is enabled. It is not set if some upper layer uses integrity metadata. Document it. Signed-off-by: Milan Broz <[email protected]> Co-developed-by: Martin K. Petersen <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 03c90af commit fc22b34

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

Documentation/ABI/stable/sysfs-block

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ Contact: Martin K. Petersen <[email protected]>
109109
Description:
110110
Indicates whether a storage device is capable of storing
111111
integrity metadata. Set if the device is T10 PI-capable.
112+
This flag is set to 1 if the storage media is formatted
113+
with T10 Protection Information. If the storage media is
114+
not formatted with T10 Protection Information, this flag
115+
is set to 0.
112116

113117

114118
What: /sys/block/<disk>/integrity/format
@@ -117,6 +121,13 @@ Contact: Martin K. Petersen <[email protected]>
117121
Description:
118122
Metadata format for integrity capable block device.
119123
E.g. T10-DIF-TYPE1-CRC.
124+
This field describes the type of T10 Protection Information
125+
that the block device can send and receive.
126+
If the device can store application integrity metadata but
127+
no T10 Protection Information profile is used, this field
128+
contains "nop".
129+
If the device does not support integrity metadata, this
130+
field contains "none".
120131

121132

122133
What: /sys/block/<disk>/integrity/protection_interval_bytes
@@ -142,7 +153,17 @@ Date: June 2008
142153
Contact: Martin K. Petersen <[email protected]>
143154
Description:
144155
Number of bytes of integrity tag space available per
145-
512 bytes of data.
156+
protection_interval_bytes, which is typically
157+
the device's logical block size.
158+
This field describes the size of the application tag
159+
if the storage device is formatted with T10 Protection
160+
Information and permits use of the application tag.
161+
The tag_size is reported in bytes and indicates the
162+
space available for adding an opaque tag to each block
163+
(protection_interval_bytes).
164+
If the device does not support T10 Protection Information
165+
(even if the device provides application integrity
166+
metadata space), this field is set to 0.
146167

147168

148169
What: /sys/block/<disk>/integrity/write_generate

0 commit comments

Comments
 (0)