diff --git a/include/sys/zio_impl.h b/include/sys/zio_impl.h index febe0a87b4..1c0a44059d 100644 --- a/include/sys/zio_impl.h +++ b/include/sys/zio_impl.h @@ -25,6 +25,7 @@ /* * Copyright (c) 2012, 2015 by Delphix. All rights reserved. + * Copyright (c) 2024, Klara Inc. */ #ifndef _ZIO_IMPL_H @@ -39,7 +40,7 @@ extern "C" { * * The ZFS I/O pipeline is comprised of various stages which are defined * in the zio_stage enum below. The individual stages are used to construct - * these basic I/O operations: Read, Write, Free, Claim, and Ioctl. + * these basic I/O operations: Read, Write, Free, Claim, Ioctl and Trim. * * I/O operations: (XXX - provide detail for each of the operations) * @@ -48,6 +49,7 @@ extern "C" { * Free: * Claim: * Ioctl: + * Trim: * * Although the most common pipeline are used by the basic I/O operations * above, there are some helper pipelines (one could consider them @@ -120,43 +122,43 @@ extern "C" { * zio pipeline stage definitions */ enum zio_stage { - ZIO_STAGE_OPEN = 1 << 0, /* RWFCI */ + ZIO_STAGE_OPEN = 1 << 0, /* RWFCIT */ - ZIO_STAGE_READ_BP_INIT = 1 << 1, /* R---- */ - ZIO_STAGE_WRITE_BP_INIT = 1 << 2, /* -W--- */ - ZIO_STAGE_FREE_BP_INIT = 1 << 3, /* --F-- */ - ZIO_STAGE_ISSUE_ASYNC = 1 << 4, /* RWF-- */ - ZIO_STAGE_WRITE_COMPRESS = 1 << 5, /* -W--- */ + ZIO_STAGE_READ_BP_INIT = 1 << 1, /* R----- */ + ZIO_STAGE_WRITE_BP_INIT = 1 << 2, /* -W---- */ + ZIO_STAGE_FREE_BP_INIT = 1 << 3, /* --F--- */ + ZIO_STAGE_ISSUE_ASYNC = 1 << 4, /* -WF--T */ + ZIO_STAGE_WRITE_COMPRESS = 1 << 5, /* -W---- */ - ZIO_STAGE_ENCRYPT = 1 << 6, /* -W--- */ - ZIO_STAGE_CHECKSUM_GENERATE = 1 << 7, /* -W--- */ + ZIO_STAGE_ENCRYPT = 1 << 6, /* -W---- */ + ZIO_STAGE_CHECKSUM_GENERATE = 1 << 7, /* -W---- */ - ZIO_STAGE_NOP_WRITE = 1 << 8, /* -W--- */ + ZIO_STAGE_NOP_WRITE = 1 << 8, /* -W---- */ - ZIO_STAGE_BRT_FREE = 1 << 9, /* --F-- */ + ZIO_STAGE_BRT_FREE = 1 << 9, /* --F--- */ - ZIO_STAGE_DDT_READ_START = 1 << 10, /* R---- */ - ZIO_STAGE_DDT_READ_DONE = 1 << 11, /* R---- */ - ZIO_STAGE_DDT_WRITE = 1 << 12, /* -W--- */ - ZIO_STAGE_DDT_FREE = 1 << 13, /* --F-- */ + ZIO_STAGE_DDT_READ_START = 1 << 10, /* R----- */ + ZIO_STAGE_DDT_READ_DONE = 1 << 11, /* R----- */ + ZIO_STAGE_DDT_WRITE = 1 << 12, /* -W---- */ + ZIO_STAGE_DDT_FREE = 1 << 13, /* --F--- */ - ZIO_STAGE_GANG_ASSEMBLE = 1 << 14, /* RWFC- */ - ZIO_STAGE_GANG_ISSUE = 1 << 15, /* RWFC- */ + ZIO_STAGE_GANG_ASSEMBLE = 1 << 14, /* RWFC-- */ + ZIO_STAGE_GANG_ISSUE = 1 << 15, /* RWFC-- */ - ZIO_STAGE_DVA_THROTTLE = 1 << 16, /* -W--- */ - ZIO_STAGE_DVA_ALLOCATE = 1 << 17, /* -W--- */ - ZIO_STAGE_DVA_FREE = 1 << 18, /* --F-- */ - ZIO_STAGE_DVA_CLAIM = 1 << 19, /* ---C- */ + ZIO_STAGE_DVA_THROTTLE = 1 << 16, /* -W---- */ + ZIO_STAGE_DVA_ALLOCATE = 1 << 17, /* -W---- */ + ZIO_STAGE_DVA_FREE = 1 << 18, /* --F--- */ + ZIO_STAGE_DVA_CLAIM = 1 << 19, /* ---C-- */ - ZIO_STAGE_READY = 1 << 20, /* RWFCI */ + ZIO_STAGE_READY = 1 << 20, /* RWFCIT */ - ZIO_STAGE_VDEV_IO_START = 1 << 21, /* RW--I */ - ZIO_STAGE_VDEV_IO_DONE = 1 << 22, /* RW--I */ - ZIO_STAGE_VDEV_IO_ASSESS = 1 << 23, /* RW--I */ + ZIO_STAGE_VDEV_IO_START = 1 << 21, /* RW--IT */ + ZIO_STAGE_VDEV_IO_DONE = 1 << 22, /* RW---T */ + ZIO_STAGE_VDEV_IO_ASSESS = 1 << 23, /* RW--IT */ - ZIO_STAGE_CHECKSUM_VERIFY = 1 << 24, /* R---- */ + ZIO_STAGE_CHECKSUM_VERIFY = 1 << 24, /* R----- */ - ZIO_STAGE_DONE = 1 << 25 /* RWFCI */ + ZIO_STAGE_DONE = 1 << 25 /* RWFCIT */ }; #define ZIO_ROOT_PIPELINE \ diff --git a/man/man8/zpool-events.8 b/man/man8/zpool-events.8 index e1436f6ded..a7a9e33442 100644 --- a/man/man8/zpool-events.8 +++ b/man/man8/zpool-events.8 @@ -25,8 +25,9 @@ .\" Copyright (c) 2018 George Melikov. All Rights Reserved. .\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. +.\" Copyright (c) 2024, Klara Inc. .\" -.Dd July 11, 2023 +.Dd February 28, 2024 .Dt ZPOOL-EVENTS 8 .Os . @@ -363,7 +364,7 @@ that is, the bits set in the good data which are cleared in the bad data. .Sh I/O STAGES The ZFS I/O pipeline is comprised of various stages which are defined below. The individual stages are used to construct these basic I/O -operations: Read, Write, Free, Claim, and Ioctl. +operations: Read, Write, Free, Claim, Ioctl and Trim. These stages may be set on an event to describe the life cycle of a given I/O request. .Pp @@ -372,43 +373,43 @@ tab(:); l l l . Stage:Bit Mask:Operations _:_:_ -ZIO_STAGE_OPEN:0x00000001:RWFCI +ZIO_STAGE_OPEN:0x00000001:RWFCIT -ZIO_STAGE_READ_BP_INIT:0x00000002:R---- -ZIO_STAGE_WRITE_BP_INIT:0x00000004:-W--- -ZIO_STAGE_FREE_BP_INIT:0x00000008:--F-- -ZIO_STAGE_ISSUE_ASYNC:0x00000010:RWF-- -ZIO_STAGE_WRITE_COMPRESS:0x00000020:-W--- +ZIO_STAGE_READ_BP_INIT:0x00000002:R----- +ZIO_STAGE_WRITE_BP_INIT:0x00000004:-W---- +ZIO_STAGE_FREE_BP_INIT:0x00000008:--F--- +ZIO_STAGE_ISSUE_ASYNC:0x00000010:-WF--T +ZIO_STAGE_WRITE_COMPRESS:0x00000020:-W---- -ZIO_STAGE_ENCRYPT:0x00000040:-W--- -ZIO_STAGE_CHECKSUM_GENERATE:0x00000080:-W--- +ZIO_STAGE_ENCRYPT:0x00000040:-W---- +ZIO_STAGE_CHECKSUM_GENERATE:0x00000080:-W---- -ZIO_STAGE_NOP_WRITE:0x00000100:-W--- +ZIO_STAGE_NOP_WRITE:0x00000100:-W---- -ZIO_STAGE_BRT_FREE:0x00000200:--F-- +ZIO_STAGE_BRT_FREE:0x00000200:--F--- -ZIO_STAGE_DDT_READ_START:0x00000400:R---- -ZIO_STAGE_DDT_READ_DONE:0x00000800:R---- -ZIO_STAGE_DDT_WRITE:0x00001000:-W--- -ZIO_STAGE_DDT_FREE:0x00002000:--F-- +ZIO_STAGE_DDT_READ_START:0x00000400:R----- +ZIO_STAGE_DDT_READ_DONE:0x00000800:R----- +ZIO_STAGE_DDT_WRITE:0x00001000:-W---- +ZIO_STAGE_DDT_FREE:0x00002000:--F--- -ZIO_STAGE_GANG_ASSEMBLE:0x00004000:RWFC- -ZIO_STAGE_GANG_ISSUE:0x00008000:RWFC- +ZIO_STAGE_GANG_ASSEMBLE:0x00004000:RWFC-- +ZIO_STAGE_GANG_ISSUE:0x00008000:RWFC-- -ZIO_STAGE_DVA_THROTTLE:0x00010000:-W--- -ZIO_STAGE_DVA_ALLOCATE:0x00020000:-W--- -ZIO_STAGE_DVA_FREE:0x00040000:--F-- -ZIO_STAGE_DVA_CLAIM:0x00080000:---C- +ZIO_STAGE_DVA_THROTTLE:0x00010000:-W---- +ZIO_STAGE_DVA_ALLOCATE:0x00020000:-W---- +ZIO_STAGE_DVA_FREE:0x00040000:--F--- +ZIO_STAGE_DVA_CLAIM:0x00080000:---C-- -ZIO_STAGE_READY:0x00100000:RWFCI +ZIO_STAGE_READY:0x00100000:RWFCIT -ZIO_STAGE_VDEV_IO_START:0x00200000:RW--I -ZIO_STAGE_VDEV_IO_DONE:0x00400000:RW--I -ZIO_STAGE_VDEV_IO_ASSESS:0x00800000:RW--I +ZIO_STAGE_VDEV_IO_START:0x00200000:RW--IT +ZIO_STAGE_VDEV_IO_DONE:0x00400000:RW---T +ZIO_STAGE_VDEV_IO_ASSESS:0x00800000:RW--IT -ZIO_STAGE_CHECKSUM_VERIFY:0x01000000:R---- +ZIO_STAGE_CHECKSUM_VERIFY:0x01000000:R----- -ZIO_STAGE_DONE:0x02000000:RWFCI +ZIO_STAGE_DONE:0x02000000:RWFCIT .TE . .Sh I/O FLAGS