Skip to content

Commit 12a1c93

Browse files
damien-lemoalaxboe
authored andcommitted
block: fix op_is_zone_mgmt() to handle REQ_OP_ZONE_RESET_ALL
REQ_OP_ZONE_RESET_ALL is a zone management request. Fix op_is_zone_mgmt() to return true for that operation, like it already does for REQ_OP_ZONE_RESET. While no problems were reported without this fix, this change allows strengthening checks in various block device drivers (scsi sd, virtioblk, DM) where op_is_zone_mgmt() is used to verify that a zone management command is not being issued to a regular block device. Fixes: 6c1b1da ("block: add zone open, close and finish operations") Cc: [email protected] Signed-off-by: Damien Le Moal <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 4c8cf6b commit 12a1c93

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
@@ -478,6 +478,7 @@ static inline bool op_is_zone_mgmt(enum req_op op)
478478
{
479479
switch (op & REQ_OP_MASK) {
480480
case REQ_OP_ZONE_RESET:
481+
case REQ_OP_ZONE_RESET_ALL:
481482
case REQ_OP_ZONE_OPEN:
482483
case REQ_OP_ZONE_CLOSE:
483484
case REQ_OP_ZONE_FINISH:

0 commit comments

Comments
 (0)