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.