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]

 



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.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux