Skip to content

Commit 9ffbbb4

Browse files
damien-lemoalsnitm
authored andcommitted
block: introduce BIO_ZONE_WRITE_LOCKED bio flag
Introduce the BIO flag BIO_ZONE_WRITE_LOCKED to indicate that a BIO owns the write lock of the zone it is targeting. This is the counterpart of the struct request flag RQF_ZONE_WRITE_LOCKED. This new BIO flag is reserved for now for zone write locking control for device mapper targets exposing a zoned block device. Since in this case, the lock flag must not be propagated to the struct request that will be used to process the BIO, a BIO private flag is used rather than changing the RQF_ZONE_WRITE_LOCKED request flag into a common REQ_XXX flag that could be used for both BIO and request. This avoids conflicts down the stack with the block IO scheduler zone write locking (in mq-deadline). Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Acked-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
1 parent d0ea6bd commit 9ffbbb4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/linux/blk_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ enum {
304304
BIO_CGROUP_ACCT, /* has been accounted to a cgroup */
305305
BIO_TRACKED, /* set if bio goes through the rq_qos path */
306306
BIO_REMAPPED,
307+
BIO_ZONE_WRITE_LOCKED, /* Owns a zoned device zone write lock */
307308
BIO_FLAG_LAST
308309
};
309310

0 commit comments

Comments
 (0)