aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys/zio_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sys/zio_impl.h')
-rw-r--r--include/sys/zio_impl.h41
1 files changed, 25 insertions, 16 deletions
diff --git a/include/sys/zio_impl.h b/include/sys/zio_impl.h
index 199cca291..29a05986c 100644
--- a/include/sys/zio_impl.h
+++ b/include/sys/zio_impl.h
@@ -77,6 +77,12 @@ extern "C" {
* and zstd. Compression occurs as part of the write pipeline and is
* performed in the ZIO_STAGE_WRITE_BP_INIT stage.
*
+ * Block cloning:
+ * The block cloning functionality introduces ZIO_STAGE_BRT_FREE stage which
+ * is called during a free pipeline. If the block is referenced in the
+ * Block Cloning Table (BRT) we will just decrease its reference counter
+ * instead of actually freeing the block.
+ *
* Dedup:
* Dedup reads are handled by the ZIO_STAGE_DDT_READ_START and
* ZIO_STAGE_DDT_READ_DONE stages. These stages are added to an existing
@@ -127,28 +133,30 @@ enum zio_stage {
ZIO_STAGE_NOP_WRITE = 1 << 8, /* -W--- */
- ZIO_STAGE_DDT_READ_START = 1 << 9, /* R---- */
- ZIO_STAGE_DDT_READ_DONE = 1 << 10, /* R---- */
- ZIO_STAGE_DDT_WRITE = 1 << 11, /* -W--- */
- ZIO_STAGE_DDT_FREE = 1 << 12, /* --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_GANG_ASSEMBLE = 1 << 13, /* RWFC- */
- ZIO_STAGE_GANG_ISSUE = 1 << 14, /* RWFC- */
+ ZIO_STAGE_GANG_ASSEMBLE = 1 << 14, /* RWFC- */
+ ZIO_STAGE_GANG_ISSUE = 1 << 15, /* RWFC- */
- ZIO_STAGE_DVA_THROTTLE = 1 << 15, /* -W--- */
- ZIO_STAGE_DVA_ALLOCATE = 1 << 16, /* -W--- */
- ZIO_STAGE_DVA_FREE = 1 << 17, /* --F-- */
- ZIO_STAGE_DVA_CLAIM = 1 << 18, /* ---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 << 19, /* RWFCI */
+ ZIO_STAGE_READY = 1 << 20, /* RWFCI */
- ZIO_STAGE_VDEV_IO_START = 1 << 20, /* RW--I */
- ZIO_STAGE_VDEV_IO_DONE = 1 << 21, /* RW--I */
- ZIO_STAGE_VDEV_IO_ASSESS = 1 << 22, /* RW--I */
+ 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_CHECKSUM_VERIFY = 1 << 23, /* R---- */
+ ZIO_STAGE_CHECKSUM_VERIFY = 1 << 24, /* R---- */
- ZIO_STAGE_DONE = 1 << 24 /* RWFCI */
+ ZIO_STAGE_DONE = 1 << 25 /* RWFCI */
};
#define ZIO_INTERLOCK_STAGES \
@@ -233,6 +241,7 @@ enum zio_stage {
#define ZIO_FREE_PIPELINE \
(ZIO_INTERLOCK_STAGES | \
ZIO_STAGE_FREE_BP_INIT | \
+ ZIO_STAGE_BRT_FREE | \
ZIO_STAGE_DVA_FREE)
#define ZIO_DDT_FREE_PIPELINE \