From: hch@lst.de (Christoph Hellwig)
Subject: [RESEND-nvme-4.13] nvme: Implement NS Optimal IO Boundary from 1.3 Spec
Date: Thu, 15 Jun 2017 14:27:17 +0200 [thread overview]
Message-ID: <20170615122717.GA23459@lst.de> (raw)
In-Reply-To: <20170614163753.5215-1-scott.bauer@intel.com>
Hi Scott,
can you resend this against the nvme-4.13 tree, it clashes badly
with some of the other changes.
Also a few comments:
> blk_queue_logical_block_size(ns->queue, bs);
> + if (ns->noiob) {
> + /* Convert from controller logical blocks to 512 sectors. */
> + iob = (((unsigned int)ns->noiob) << ns->lba_shift) >> 9;
> + iob = rounddown_pow_of_two(iob);
> + blk_queue_chunk_sectors(ns->queue, iob);
> + }
What about moving this into a little helper:
static void nvme_set_chunk_size(struct nvme_ns *ns)
{
unsigned int chunk_size = (((u32)ns->noiob) << ns->lba_shift) >> 9;
blk_queue_chunk_sectors(ns->queue, rounddown_pow_of_two(chunk_size));
}
next prev parent reply other threads:[~2017-06-15 12:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 16:37 [RESEND-nvme-4.13] nvme: Implement NS Optimal IO Boundary from 1.3 Spec Scott Bauer
2017-06-15 12:27 ` Christoph Hellwig [this message]
2017-06-15 15:46 ` Scott Bauer
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=20170615122717.GA23459@lst.de \
--to=hch@lst.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox