Re: [PATCH V5 10/14] block: mq-deadline: Add zoned block device data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bart,

On Mon, 2017-09-25 at 21:34 +0000, Bart Van Assche wrote:
> 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?

Yes indeed. I am aware of this, hence the last patch of the series which
disables setting a default scheduler for blk-mq devices.

That is however a little extreme. So for V6, I am looking at diferring the
default elevator setup after device information is gathered. Not sure where
the right place to do so is though. Looking.

Best regards.

-- 
Damien Le Moal
Western Digital




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux