Drives with MDTS set to zero
Busch, Keith
keith.busch at intel.com
Wed Nov 18 15:08:49 PST 2015
Ugh, broken again, sorry, having a distracted day...
I'll resend as a proper patch that really works.
> On Wed, Nov 18, 2015 at 10:58:20PM +0000, Keith Busch wrote:
> > We can fix this by reordering the math instead of artificially reducing
> > the transfer size.
>
> Resend with an actually compilable patch.
>
> ---
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index 5aca81c..f17e3d3 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -2266,7 +2266,7 @@ static void nvme_alloc_ns(struct nvme_dev *dev, unsigned nsid)
> if (dev->max_hw_sectors) {
> blk_queue_max_hw_sectors(ns->queue, dev->max_hw_sectors);
> blk_queue_max_segments(ns->queue,
> - ((dev->max_hw_sectors << 9) / dev->page_size) + 1);
> + (dev->max_hw_sectors / (dev->page_size >> 9) + 1);
> }
> if (dev->stripe_size)
> blk_queue_chunk_sectors(ns->queue, dev->stripe_size >> 9);
> --
More information about the Linux-nvme
mailing list