On 6/25/25 4:36 PM, Damien Le Moal wrote:
On 6/26/25 01:29, Bart Van Assche wrote:
On 6/25/25 2:33 AM, Damien Le Moal wrote:
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index 3d1577f07c1c..930daff207df 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -350,11 +350,11 @@ enum req_op {
/* Close a zone */
REQ_OP_ZONE_CLOSE = (__force blk_opf_t)11,
/* Transition a zone to full */
- REQ_OP_ZONE_FINISH = (__force blk_opf_t)12,
+ REQ_OP_ZONE_FINISH = (__force blk_opf_t)13,
/* reset a zone write pointer */
- REQ_OP_ZONE_RESET = (__force blk_opf_t)13,
+ REQ_OP_ZONE_RESET = (__force blk_opf_t)15,
/* reset all the zone present on the device */
- REQ_OP_ZONE_RESET_ALL = (__force blk_opf_t)15,
+ REQ_OP_ZONE_RESET_ALL = (__force blk_opf_t)17,
/* Driver private requests */
REQ_OP_DRV_IN = (__force blk_opf_t)34,
Since we are renumbering operation types, how about also
renumbering REQ_OP_ZONE_OPEN and/or REQ_OP_ZONE_CLOSE? Neither operation
modifies data on the storage medium nor any write pointers so these
operations shouldn't be considered as write operations, isn't it?
Open and close change the zone condition and act on the drive count of
explicitly open zone resources which impacts the ability to write to zones. So I
would rather consider these also write operations given the changes they imply.
It's probably a good idea to document above the op_is_write() function
that this function is used for multiple purposes:
- Whether it is allowed to submit an operation to a read-only device.
bio_check_ro() and the loop driver uses op_is_write() for this
purpose.
- Whether or not lim->zone_write_granularity applies. See also
bio_split_rw_at().
- Whether or not to throttle the queue depth. See also various I/O
schedulers.
- To determine the DMA data transfer direction.
- By the block layer I/O statistics code.
- By the blkio cgroup controller statistics code.
Thanks,
Bart.