From: keith.busch@intel.com (Keith Busch)
Subject: Drives with MDTS set to zero
Date: Wed, 18 Nov 2015 23:02:27 +0000 [thread overview]
Message-ID: <20151118230226.GC24252@localhost.localdomain> (raw)
In-Reply-To: <20151118225820.GB24252@localhost.localdomain>
On Wed, Nov 18, 2015@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);
--
next prev parent reply other threads:[~2015-11-18 23:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-17 20:51 Drives with MDTS set to zero Paul Grabinar
2015-11-18 22:58 ` Keith Busch
2015-11-18 23:02 ` Keith Busch [this message]
2015-11-18 23:08 ` Busch, Keith
2015-11-19 8:34 ` Paul Grabinar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151118230226.GC24252@localhost.localdomain \
--to=keith.busch@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.