[PATCHv2] nvme: only use power of two io boundaries

Keith Busch kbusch at kernel.org
Thu Aug 27 12:44:05 EDT 2020


On Thu, Aug 27, 2020 at 06:06:44PM +0200, Christoph Hellwig wrote:
> On Thu, Aug 27, 2020 at 08:28:24AM -0700, Keith Busch wrote:
> > +	if (is_power_of_2(iob) && !blk_queue_is_zoned(ns->queue))
> > +		blk_queue_chunk_sectors(ns->queue, iob);
> > +	else if (iob && !(disk->flags & GENHD_FL_UP))
> > +		dev_warn(ctrl->device, "namespace:%u has unused io boundary:%u\n",
> > +			ns->head->ns_id, iob);
> > +
> 
> Similar to the zoned stuff I just find this super hard to read.
> 
> I wonder if we need to untangle this a little.  Something like

That's fine. Do you want to see a prep patch splitting chunk settings
first then power-of-2 check second, or okay as a single patch?



More information about the Linux-nvme mailing list