[PATCH v3 2/4] blk-iocost: charge zone appends as writes
From: Tao Cui
Date: Sun Sep 20 2026 - 23:36:32 EST
From: Tao Cui <cuitao@xxxxxxxxxx>
Zone append is a primary write operation for zoned devices; zoned xfs
and btrfs use it for data writes. It is priced at zero, so the zone
append portion of zoned workloads runs outside the controller: a
1%-weight cgroup issued 16000 appends at zero cost on a zoned null_blk.
Treat REQ_OP_ZONE_APPEND the same as REQ_OP_WRITE so it goes through
the existing seq/rand classification and charging.
Fixes: 0512a75b98f8 ("block: Introduce REQ_OP_ZONE_APPEND")
Signed-off-by: Tao Cui <cuitao@xxxxxxxxxx>
---
block/blk-iocost.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index 0a0352554dde..7ce68e2c2e1a 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -2565,6 +2565,7 @@ static void calc_vtime_cost_builtin(struct bio *bio, struct ioc_gq *iocg,
coef_randio = ioc->params.lcoefs[LCOEF_RRANDIO];
coef_page = ioc->params.lcoefs[LCOEF_RPAGE];
break;
+ case REQ_OP_ZONE_APPEND:
case REQ_OP_WRITE:
coef_seqio = ioc->params.lcoefs[LCOEF_WSEQIO];
coef_randio = ioc->params.lcoefs[LCOEF_WRANDIO];
--
2.43.0