linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	Damien Le Moal <Damien.LeMoal@wdc.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>
Cc: "hch@lst.de" <hch@lst.de>
Subject: Re: [PATCH V5 10/14] block: mq-deadline: Add zoned block device data
Date: Mon, 25 Sep 2017 21:34:15 +0000	[thread overview]
Message-ID: <1506375254.2641.26.camel@wdc.com> (raw)
In-Reply-To: <20170925061454.5533-11-damien.lemoal@wdc.com>

On Mon, 2017-09-25 at 15:14 +0900, Damien Le Moal wrote:
> Modify mq-dealine init_queue and exit_queue elevator methods to handle
         ^^^^^^^^^^
         mq-deadline ?

> +static int deadline_init_zones_wlock(struct request_queue *q,
> +				     struct deadline_data *dd)
> +{
> +	/*
> +	 * For regular drives or non-conforming zoned block device,
> +	 * do not use zone write locking.
> +	 */
> +	if (!blk_queue_nr_zones(q))
> +		return 0;
> +
> +	/*
> +	 * Treat host aware drives as regular disks.
> +	 */
> +	if (blk_queue_zoned_model(q) != BLK_ZONED_HM)
> +		return 0;
> +
> +	dd->zones_wlock = kzalloc_node(BITS_TO_LONGS(blk_queue_nr_zones(q))
> +				       * sizeof(unsigned long),
> +				       GFP_KERNEL, q->node);

A request queue is created before disk validation occurs and before the
number of zones is initialized (sd_probe_async()). If a scheduler is
assigned to a ZBC drive through a udev rule, can it happen that
deadline_init_zones_wlock() is called before the number of zones has been
initialized?

Bart.

  reply	other threads:[~2017-09-25 21:34 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-25  6:14 [PATCH V5 00/14] scsi-mq support for ZBC disks Damien Le Moal
2017-09-25  6:14 ` [PATCH V5 01/14] scsi: sd_zbc: Move ZBC declarations to scsi_proto.h Damien Le Moal
2017-09-25  6:14 ` [PATCH V5 02/14] scsi: sd_zbc: Fix comments and indentation Damien Le Moal
2017-10-02 23:01   ` Bart Van Assche
2017-09-25  6:14 ` [PATCH V5 03/14] scsi: sd_zbc: Rearrange code Damien Le Moal
2017-09-25 21:02   ` Bart Van Assche
2017-09-25  6:14 ` [PATCH V5 04/14] scsi: sd_zbc: Use well defined macros Damien Le Moal
2017-09-25  6:14 ` [PATCH V5 05/14] scsi: sd_zbc: Fix sd_zbc_read_zoned_characteristics() Damien Le Moal
2017-09-25  6:14 ` [PATCH V5 06/14] block: Add zoned block device information to request queue Damien Le Moal
2017-09-25 10:05   ` Ming Lei
2017-09-25 21:06   ` Bart Van Assche
2017-09-25  6:14 ` [PATCH V5 07/14] scsi: sd_zbc: Initialize device request queue zoned data Damien Le Moal
2017-09-25 21:17   ` Bart Van Assche
2017-10-02  4:29     ` Damien Le Moal
2017-09-25  6:14 ` [PATCH V5 08/14] scsi: sd_zbc: Limit zone write locking to sequential zones Damien Le Moal
2017-09-25  6:14 ` [PATCH V5 09/14] scsi: sd_zbc: Disable zone write locking with scsi-mq Damien Le Moal
2017-09-25  6:14 ` [PATCH V5 10/14] block: mq-deadline: Add zoned block device data Damien Le Moal
2017-09-25 21:34   ` Bart Van Assche [this message]
2017-10-02  4:32     ` Damien Le Moal
2017-09-25  6:14 ` [PATCH V5 11/14] blokc: mq-deadline: Introduce dispatch helpers Damien Le Moal
2017-09-25 21:44   ` Bart Van Assche
2017-09-25  6:14 ` [PATCH V5 12/14] block: mq-deadline: Introduce zone locking support Damien Le Moal
2017-09-25 22:00   ` Bart Van Assche
2017-10-02  4:36     ` Damien Le Moal
2017-09-25  6:14 ` [PATCH V5 13/14] block: mq-deadline: Limit write request dispatch for zoned block devices Damien Le Moal
2017-09-25 22:06   ` Bart Van Assche
2017-10-02  4:38     ` Damien Le Moal
2017-09-25  6:14 ` [PATCH V5 14/14] block: do not set mq default scheduler 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=1506375254.2641.26.camel@wdc.com \
    --to=bart.vanassche@wdc.com \
    --cc=Damien.LeMoal@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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;
as well as URLs for NNTP newsgroup(s).