[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160930191237.13695-5-shaun@tancheff.com>
Date: Fri, 30 Sep 2016 14:12:33 -0500
From: Shaun Tancheff <shaun@...cheff.com>
To: Jens Axboe <axboe@...nel.dk>
Cc: Shaun Tancheff <shaun.tancheff@...gate.com>,
linux-block@...r.kernel.org, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org, Christoph Hellwig <hch@....de>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
"James E . J . Bottomley" <jejb@...ux.vnet.ibm.com>,
Damien Le Moal <damien.lemoal@...t.com>,
Hannes Reinecke <hare@...e.de>,
Michael T Lombardi <michael.t.lombardi@...gate.com>
Subject: [PATCH v6 4/7] block: Define zoned block device operations
From: Shaun Tancheff <shaun.tancheff@...gate.com>
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: Shaun Tancheff <shaun.tancheff@...gate.com>
Signed-off-by: Damien Le Moal <damien.lemoal@...t.com>
Reviewed-by: Christoph Hellwig <hch@....de>
Reviewed-by: Martin K. Petersen <martin.petersen@...cle.com>
---
block/blk-core.c | 4 ++++
include/linux/blk_types.h | 2 ++
2 files changed, 6 insertions(+)
diff --git a/block/blk-core.c b/block/blk-core.c
index 14d7c07..e4eda5d 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1941,6 +1941,10 @@ generic_make_request_checks(struct bio *bio)
case REQ_OP_WRITE_SAME:
if (!bdev_write_same(bio->bi_bdev))
goto not_supported;
+ case REQ_OP_ZONE_REPORT:
+ case REQ_OP_ZONE_RESET:
+ if (!bdev_is_zoned(bio->bi_bdev))
+ goto not_supported;
break;
default:
break;
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index cd395ec..dd50dce 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -243,6 +243,8 @@ enum req_op {
REQ_OP_SECURE_ERASE, /* request to securely erase sectors */
REQ_OP_WRITE_SAME, /* write same block many times */
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
--
2.9.3
Powered by blists - more mailing lists