From: Shaun Tancheff <shaun@tancheff.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Shaun Tancheff <shaun.tancheff@seagate.com>,
linux-block@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
Damien Le Moal <damien.lemoal@hgst.com>,
Hannes Reinecke <hare@suse.de>,
Michael T Lombardi <michael.t.lombardi@seagate.com>
Subject: [PATCH v6 4/7] block: Define zoned block device operations
Date: Fri, 30 Sep 2016 14:12:33 -0500 [thread overview]
Message-ID: <20160930191237.13695-5-shaun@tancheff.com> (raw)
In-Reply-To: <20160930191237.13695-1-shaun@tancheff.com>
From: Shaun Tancheff <shaun.tancheff@seagate.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@seagate.com>
Signed-off-by: Damien Le Moal <damien.lemoal@hgst.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.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
next prev parent reply other threads:[~2016-09-30 19:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-30 19:12 [PATCH v6 0/7] ZBC / Zoned block device support Shaun Tancheff
2016-09-30 19:12 ` [PATCH v6 1/7] block: Add 'zoned' queue limit Shaun Tancheff
2016-09-30 19:12 ` [PATCH v6 2/7] blk-sysfs: Add 'chunk_sectors' to sysfs attributes Shaun Tancheff
2016-09-30 19:12 ` [PATCH v6 3/7] block: update chunk_sectors in blk_stack_limits() Shaun Tancheff
2016-09-30 19:12 ` Shaun Tancheff [this message]
2016-09-30 19:12 ` [PATCH v6 5/7] block: Implement support for zoned block devices Shaun Tancheff
2016-09-30 19:12 ` [PATCH v6 6/7] sd: Implement support for ZBC devices Shaun Tancheff
2016-09-30 19:12 ` [PATCH v6 7/7] blk-zoned: implement ioctls Shaun Tancheff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160930191237.13695-5-shaun@tancheff.com \
--to=shaun@tancheff.com \
--cc=axboe@kernel.dk \
--cc=damien.lemoal@hgst.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=michael.t.lombardi@seagate.com \
--cc=shaun.tancheff@seagate.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome