Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: keith.busch@intel.com (Keith Busch)
Subject: [nvme-4.13 V2] nvme: Implement NS Optimal IO Boundary from 1.3 Spec
Date: Thu, 15 Jun 2017 13:03:02 -0400	[thread overview]
Message-ID: <20170615170302.GC13399@localhost.localdomain> (raw)
In-Reply-To: <20170615165731.GB13399@localhost.localdomain>

On Thu, Jun 15, 2017@12:57:31PM -0400, Keith Busch wrote:
> Let's say we've a large noiob (16k) with a 4k block size. The above would
> shift beyond 32-bits, so I would rewrite this as:
> 
> 	unsigned int chunk_size = (((u32)ns->noiob) << (ns->lba_shift - 9));

Oops, please disregard the fact I'm can't count overflow correctly...

I still prefer the alternate shift calculation, though.

      reply	other threads:[~2017-06-15 17:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-15 15:47 [nvme-4.13 V2] nvme: Implement NS Optimal IO Boundary from 1.3 Spec Scott Bauer
2017-06-15 15:52 ` Scott Bauer
2017-06-15 16:08   ` Christoph Hellwig
2017-06-15 16:57 ` Keith Busch
2017-06-15 17:03   ` Keith Busch [this message]

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=20170615170302.GC13399@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox