提交 2d253440 编写于 作者: S Shaun Tancheff 提交者: Jens Axboe

block: Define zoned block device operations

Define REQ_OP_ZONE_REPORT and REQ_OP_ZONE_RESET for handling zones of
host-managed and host-aware zoned block devices. With with these two
new operations, the total number of operations defined reaches 8 and
still fits with the 3 bits definition of REQ_OP_BITS.
Signed-off-by: NShaun Tancheff <shaun.tancheff@seagate.com>
Signed-off-by: NDamien Le Moal <damien.lemoal@hgst.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: NHannes Reinecke <hare@suse.com>
Signed-off-by: NJens Axboe <axboe@fb.com>
上级 987b3b26
...@@ -1941,6 +1941,10 @@ generic_make_request_checks(struct bio *bio) ...@@ -1941,6 +1941,10 @@ generic_make_request_checks(struct bio *bio)
case REQ_OP_WRITE_SAME: case REQ_OP_WRITE_SAME:
if (!bdev_write_same(bio->bi_bdev)) if (!bdev_write_same(bio->bi_bdev))
goto not_supported; goto not_supported;
case REQ_OP_ZONE_REPORT:
case REQ_OP_ZONE_RESET:
if (!bdev_is_zoned(bio->bi_bdev))
goto not_supported;
break; break;
default: default:
break; break;
......
...@@ -243,6 +243,8 @@ enum req_op { ...@@ -243,6 +243,8 @@ enum req_op {
REQ_OP_SECURE_ERASE, /* request to securely erase sectors */ REQ_OP_SECURE_ERASE, /* request to securely erase sectors */
REQ_OP_WRITE_SAME, /* write same block many times */ REQ_OP_WRITE_SAME, /* write same block many times */
REQ_OP_FLUSH, /* request for cache flush */ REQ_OP_FLUSH, /* request for cache flush */
REQ_OP_ZONE_REPORT, /* Get zone information */
REQ_OP_ZONE_RESET, /* Reset a zone write pointer */
}; };
#define REQ_OP_BITS 3 #define REQ_OP_BITS 3
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册