linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Damien Le Moal <Damien.LeMoal@wdc.com>
To: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Cc: "axboe@kernel.dk" <axboe@kernel.dk>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	"dennis@kernel.org" <dennis@kernel.org>,
	"hare@suse.com" <hare@suse.com>,
	"sagi@grimberg.me" <sagi@grimberg.me>,
	"dennisszhou@gmail.com" <dennisszhou@gmail.com>,
	"jthumshirn@suse.de" <jthumshirn@suse.de>,
	"osandov@fb.com" <osandov@fb.com>,
	"ming.lei@redhat.com" <ming.lei@redhat.com>,
	"tj@kernel.org" <tj@kernel.org>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Subject: Re: [PATCH 1/4] block: add req op to reset all zones and flag
Date: Thu, 1 Aug 2019 00:53:21 +0000	[thread overview]
Message-ID: <BYAPR04MB5816258729B9EE74E81129CAE7DE0@BYAPR04MB5816.namprd04.prod.outlook.com> (raw)
In-Reply-To: 20190731210102.3472-2-chaitanya.kulkarni@wdc.com

On 2019/08/01 6:01, Chaitanya Kulkarni wrote:
> This patch introduces a new request operation REQ_OP_ZONE_RESET_ALL.
> This is useful for the applications like mkfs where it needs to reset
> all the zones present on the underlying block device. As part for this
> patch we also introduce new QUEUE_FLAG_ZONE_RESETALL which indicates the
> queue zone reset all capability and corresponding helper macro.
> 
> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
> ---
>  include/linux/blk_types.h | 2 ++
>  include/linux/blkdev.h    | 3 +++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
> index feff3fe4467e..3991b580d6bd 100644
> --- a/include/linux/blk_types.h
> +++ b/include/linux/blk_types.h
> @@ -282,6 +282,8 @@ enum req_opf {
>  	REQ_OP_ZONE_RESET	= 6,
>  	/* write the same sector many times */
>  	REQ_OP_WRITE_SAME	= 7,
> +	/* reset all the zone present on the device */
> +	REQ_OP_ZONE_RESET_ALL	= 8,
>  	/* write the zero filled sector many times */
>  	REQ_OP_WRITE_ZEROES	= 9,
>  
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index 1ef375dafb1c..474008bffee2 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -611,6 +611,7 @@ struct request_queue {
>  #define QUEUE_FLAG_SCSI_PASSTHROUGH 23	/* queue supports SCSI commands */
>  #define QUEUE_FLAG_QUIESCED	24	/* queue has been quiesced */
>  #define QUEUE_FLAG_PCI_P2PDMA	25	/* device supports PCI p2p requests */
> +#define QUEUE_FLAG_ZONE_RESETALL 26	/* supports Zone Reset All */
>  
>  #define QUEUE_FLAG_MQ_DEFAULT	((1 << QUEUE_FLAG_IO_STAT) |		\
>  				 (1 << QUEUE_FLAG_SAME_COMP))
> @@ -630,6 +631,8 @@ bool blk_queue_flag_test_and_set(unsigned int flag, struct request_queue *q);
>  #define blk_queue_io_stat(q)	test_bit(QUEUE_FLAG_IO_STAT, &(q)->queue_flags)
>  #define blk_queue_add_random(q)	test_bit(QUEUE_FLAG_ADD_RANDOM, &(q)->queue_flags)
>  #define blk_queue_discard(q)	test_bit(QUEUE_FLAG_DISCARD, &(q)->queue_flags)
> +#define blk_queue_zone_resetall(q)	\
> +	test_bit(QUEUE_FLAG_ZONE_RESETALL, &(q)->queue_flags)
>  #define blk_queue_secure_erase(q) \
>  	(test_bit(QUEUE_FLAG_SECERASE, &(q)->queue_flags))
>  #define blk_queue_dax(q)	test_bit(QUEUE_FLAG_DAX, &(q)->queue_flags)
> 

Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>

-- 
Damien Le Moal
Western Digital Research

  reply	other threads:[~2019-08-01  0:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-31 21:00 [PATCH 0/4] block: introduce REQ_OP_ZONE_RESET_ALL Chaitanya Kulkarni
2019-07-31 21:00 ` [PATCH 1/4] block: add req op to reset all zones and flag Chaitanya Kulkarni
2019-08-01  0:53   ` Damien Le Moal [this message]
2019-07-31 21:01 ` [PATCH 2/4] blk-zoned: implement REQ_OP_ZONE_RESET_ALL Chaitanya Kulkarni
2019-08-01  0:55   ` Damien Le Moal
2019-08-01  4:51     ` Chaitanya Kulkarni
2019-08-01  8:40       ` Damien Le Moal
2019-07-31 21:01 ` [PATCH 3/4] scsi: " Chaitanya Kulkarni
2019-08-01  1:00   ` Damien Le Moal
2019-07-31 21:01 ` [PATCH 4/4] null_blk: " Chaitanya Kulkarni
2019-08-01  1:03   ` Damien Le Moal

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=BYAPR04MB5816258729B9EE74E81129CAE7DE0@BYAPR04MB5816.namprd04.prod.outlook.com \
    --to=damien.lemoal@wdc.com \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=dennis@kernel.org \
    --cc=dennisszhou@gmail.com \
    --cc=hare@suse.com \
    --cc=jejb@linux.ibm.com \
    --cc=jthumshirn@suse.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=ming.lei@redhat.com \
    --cc=osandov@fb.com \
    --cc=sagi@grimberg.me \
    --cc=tj@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).