Skip to content

Commit 5c4a4f8

Browse files
authored
zio: update ZIO type x stage documentation
- add column for TRIM ZIOs - remove R from ZIO_STAGE_ISSUE_ASYNC, never happened - remove I from ZIO_STAGE_VDEV_IO_DONE, never happened Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed by: Brian Behlendorf <[email protected]> Signed-off-by: Rob Norris <[email protected]> Closes #15959
1 parent c9d8f6c commit 5c4a4f8

File tree

2 files changed

+58
-55
lines changed

2 files changed

+58
-55
lines changed

include/sys/zio_impl.h

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
/*
2727
* Copyright (c) 2012, 2015 by Delphix. All rights reserved.
28+
* Copyright (c) 2024, Klara Inc.
2829
*/
2930

3031
#ifndef _ZIO_IMPL_H
@@ -39,7 +40,7 @@ extern "C" {
3940
*
4041
* The ZFS I/O pipeline is comprised of various stages which are defined
4142
* in the zio_stage enum below. The individual stages are used to construct
42-
* these basic I/O operations: Read, Write, Free, Claim, and Ioctl.
43+
* these basic I/O operations: Read, Write, Free, Claim, Ioctl and Trim.
4344
*
4445
* I/O operations: (XXX - provide detail for each of the operations)
4546
*
@@ -48,6 +49,7 @@ extern "C" {
4849
* Free:
4950
* Claim:
5051
* Ioctl:
52+
* Trim:
5153
*
5254
* Although the most common pipeline are used by the basic I/O operations
5355
* above, there are some helper pipelines (one could consider them
@@ -120,43 +122,43 @@ extern "C" {
120122
* zio pipeline stage definitions
121123
*/
122124
enum zio_stage {
123-
ZIO_STAGE_OPEN = 1 << 0, /* RWFCI */
125+
ZIO_STAGE_OPEN = 1 << 0, /* RWFCIT */
124126

125-
ZIO_STAGE_READ_BP_INIT = 1 << 1, /* R---- */
126-
ZIO_STAGE_WRITE_BP_INIT = 1 << 2, /* -W--- */
127-
ZIO_STAGE_FREE_BP_INIT = 1 << 3, /* --F-- */
128-
ZIO_STAGE_ISSUE_ASYNC = 1 << 4, /* RWF-- */
129-
ZIO_STAGE_WRITE_COMPRESS = 1 << 5, /* -W--- */
127+
ZIO_STAGE_READ_BP_INIT = 1 << 1, /* R----- */
128+
ZIO_STAGE_WRITE_BP_INIT = 1 << 2, /* -W---- */
129+
ZIO_STAGE_FREE_BP_INIT = 1 << 3, /* --F--- */
130+
ZIO_STAGE_ISSUE_ASYNC = 1 << 4, /* -WF--T */
131+
ZIO_STAGE_WRITE_COMPRESS = 1 << 5, /* -W---- */
130132

131-
ZIO_STAGE_ENCRYPT = 1 << 6, /* -W--- */
132-
ZIO_STAGE_CHECKSUM_GENERATE = 1 << 7, /* -W--- */
133+
ZIO_STAGE_ENCRYPT = 1 << 6, /* -W---- */
134+
ZIO_STAGE_CHECKSUM_GENERATE = 1 << 7, /* -W---- */
133135

134-
ZIO_STAGE_NOP_WRITE = 1 << 8, /* -W--- */
136+
ZIO_STAGE_NOP_WRITE = 1 << 8, /* -W---- */
135137

136-
ZIO_STAGE_BRT_FREE = 1 << 9, /* --F-- */
138+
ZIO_STAGE_BRT_FREE = 1 << 9, /* --F--- */
137139

138-
ZIO_STAGE_DDT_READ_START = 1 << 10, /* R---- */
139-
ZIO_STAGE_DDT_READ_DONE = 1 << 11, /* R---- */
140-
ZIO_STAGE_DDT_WRITE = 1 << 12, /* -W--- */
141-
ZIO_STAGE_DDT_FREE = 1 << 13, /* --F-- */
140+
ZIO_STAGE_DDT_READ_START = 1 << 10, /* R----- */
141+
ZIO_STAGE_DDT_READ_DONE = 1 << 11, /* R----- */
142+
ZIO_STAGE_DDT_WRITE = 1 << 12, /* -W---- */
143+
ZIO_STAGE_DDT_FREE = 1 << 13, /* --F--- */
142144

143-
ZIO_STAGE_GANG_ASSEMBLE = 1 << 14, /* RWFC- */
144-
ZIO_STAGE_GANG_ISSUE = 1 << 15, /* RWFC- */
145+
ZIO_STAGE_GANG_ASSEMBLE = 1 << 14, /* RWFC-- */
146+
ZIO_STAGE_GANG_ISSUE = 1 << 15, /* RWFC-- */
145147

146-
ZIO_STAGE_DVA_THROTTLE = 1 << 16, /* -W--- */
147-
ZIO_STAGE_DVA_ALLOCATE = 1 << 17, /* -W--- */
148-
ZIO_STAGE_DVA_FREE = 1 << 18, /* --F-- */
149-
ZIO_STAGE_DVA_CLAIM = 1 << 19, /* ---C- */
148+
ZIO_STAGE_DVA_THROTTLE = 1 << 16, /* -W---- */
149+
ZIO_STAGE_DVA_ALLOCATE = 1 << 17, /* -W---- */
150+
ZIO_STAGE_DVA_FREE = 1 << 18, /* --F--- */
151+
ZIO_STAGE_DVA_CLAIM = 1 << 19, /* ---C-- */
150152

151-
ZIO_STAGE_READY = 1 << 20, /* RWFCI */
153+
ZIO_STAGE_READY = 1 << 20, /* RWFCIT */
152154

153-
ZIO_STAGE_VDEV_IO_START = 1 << 21, /* RW--I */
154-
ZIO_STAGE_VDEV_IO_DONE = 1 << 22, /* RW--I */
155-
ZIO_STAGE_VDEV_IO_ASSESS = 1 << 23, /* RW--I */
155+
ZIO_STAGE_VDEV_IO_START = 1 << 21, /* RW--IT */
156+
ZIO_STAGE_VDEV_IO_DONE = 1 << 22, /* RW---T */
157+
ZIO_STAGE_VDEV_IO_ASSESS = 1 << 23, /* RW--IT */
156158

157-
ZIO_STAGE_CHECKSUM_VERIFY = 1 << 24, /* R---- */
159+
ZIO_STAGE_CHECKSUM_VERIFY = 1 << 24, /* R----- */
158160

159-
ZIO_STAGE_DONE = 1 << 25 /* RWFCI */
161+
ZIO_STAGE_DONE = 1 << 25 /* RWFCIT */
160162
};
161163

162164
#define ZIO_ROOT_PIPELINE \

man/man8/zpool-events.8

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
.\" Copyright (c) 2018 George Melikov. All Rights Reserved.
2626
.\" Copyright 2017 Nexenta Systems, Inc.
2727
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
28+
.\" Copyright (c) 2024, Klara Inc.
2829
.\"
29-
.Dd July 11, 2023
30+
.Dd February 28, 2024
3031
.Dt ZPOOL-EVENTS 8
3132
.Os
3233
.
@@ -363,7 +364,7 @@ that is, the bits set in the good data which are cleared in the bad data.
363364
.Sh I/O STAGES
364365
The ZFS I/O pipeline is comprised of various stages which are defined below.
365366
The individual stages are used to construct these basic I/O
366-
operations: Read, Write, Free, Claim, and Ioctl.
367+
operations: Read, Write, Free, Claim, Ioctl and Trim.
367368
These stages may be
368369
set on an event to describe the life cycle of a given I/O request.
369370
.Pp
@@ -372,43 +373,43 @@ tab(:);
372373
l l l .
373374
Stage:Bit Mask:Operations
374375
_:_:_
375-
ZIO_STAGE_OPEN:0x00000001:RWFCI
376+
ZIO_STAGE_OPEN:0x00000001:RWFCIT
376377

377-
ZIO_STAGE_READ_BP_INIT:0x00000002:R----
378-
ZIO_STAGE_WRITE_BP_INIT:0x00000004:-W---
379-
ZIO_STAGE_FREE_BP_INIT:0x00000008:--F--
380-
ZIO_STAGE_ISSUE_ASYNC:0x00000010:RWF--
381-
ZIO_STAGE_WRITE_COMPRESS:0x00000020:-W---
378+
ZIO_STAGE_READ_BP_INIT:0x00000002:R-----
379+
ZIO_STAGE_WRITE_BP_INIT:0x00000004:-W----
380+
ZIO_STAGE_FREE_BP_INIT:0x00000008:--F---
381+
ZIO_STAGE_ISSUE_ASYNC:0x00000010:-WF--T
382+
ZIO_STAGE_WRITE_COMPRESS:0x00000020:-W----
382383

383-
ZIO_STAGE_ENCRYPT:0x00000040:-W---
384-
ZIO_STAGE_CHECKSUM_GENERATE:0x00000080:-W---
384+
ZIO_STAGE_ENCRYPT:0x00000040:-W----
385+
ZIO_STAGE_CHECKSUM_GENERATE:0x00000080:-W----
385386

386-
ZIO_STAGE_NOP_WRITE:0x00000100:-W---
387+
ZIO_STAGE_NOP_WRITE:0x00000100:-W----
387388

388-
ZIO_STAGE_BRT_FREE:0x00000200:--F--
389+
ZIO_STAGE_BRT_FREE:0x00000200:--F---
389390

390-
ZIO_STAGE_DDT_READ_START:0x00000400:R----
391-
ZIO_STAGE_DDT_READ_DONE:0x00000800:R----
392-
ZIO_STAGE_DDT_WRITE:0x00001000:-W---
393-
ZIO_STAGE_DDT_FREE:0x00002000:--F--
391+
ZIO_STAGE_DDT_READ_START:0x00000400:R-----
392+
ZIO_STAGE_DDT_READ_DONE:0x00000800:R-----
393+
ZIO_STAGE_DDT_WRITE:0x00001000:-W----
394+
ZIO_STAGE_DDT_FREE:0x00002000:--F---
394395

395-
ZIO_STAGE_GANG_ASSEMBLE:0x00004000:RWFC-
396-
ZIO_STAGE_GANG_ISSUE:0x00008000:RWFC-
396+
ZIO_STAGE_GANG_ASSEMBLE:0x00004000:RWFC--
397+
ZIO_STAGE_GANG_ISSUE:0x00008000:RWFC--
397398

398-
ZIO_STAGE_DVA_THROTTLE:0x00010000:-W---
399-
ZIO_STAGE_DVA_ALLOCATE:0x00020000:-W---
400-
ZIO_STAGE_DVA_FREE:0x00040000:--F--
401-
ZIO_STAGE_DVA_CLAIM:0x00080000:---C-
399+
ZIO_STAGE_DVA_THROTTLE:0x00010000:-W----
400+
ZIO_STAGE_DVA_ALLOCATE:0x00020000:-W----
401+
ZIO_STAGE_DVA_FREE:0x00040000:--F---
402+
ZIO_STAGE_DVA_CLAIM:0x00080000:---C--
402403

403-
ZIO_STAGE_READY:0x00100000:RWFCI
404+
ZIO_STAGE_READY:0x00100000:RWFCIT
404405

405-
ZIO_STAGE_VDEV_IO_START:0x00200000:RW--I
406-
ZIO_STAGE_VDEV_IO_DONE:0x00400000:RW--I
407-
ZIO_STAGE_VDEV_IO_ASSESS:0x00800000:RW--I
406+
ZIO_STAGE_VDEV_IO_START:0x00200000:RW--IT
407+
ZIO_STAGE_VDEV_IO_DONE:0x00400000:RW---T
408+
ZIO_STAGE_VDEV_IO_ASSESS:0x00800000:RW--IT
408409

409-
ZIO_STAGE_CHECKSUM_VERIFY:0x01000000:R----
410+
ZIO_STAGE_CHECKSUM_VERIFY:0x01000000:R-----
410411

411-
ZIO_STAGE_DONE:0x02000000:RWFCI
412+
ZIO_STAGE_DONE:0x02000000:RWFCIT
412413
.TE
413414
.
414415
.Sh I/O FLAGS

0 commit comments

Comments
 (0)