linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] NVMe: Set request queue logical block size
@ 2012-07-24 19:26 Busch, Keith
  2012-07-24 19:55 ` Matthew Wilcox
  0 siblings, 1 reply; 5+ messages in thread
From: Busch, Keith @ 2012-07-24 19:26 UTC (permalink / raw)


Sets the request queue logical block size with the block size of the namespace.

Signed-off-by: Keith Busch <keith.busch at intel.com>
---
drivers/block/nvme.c |    1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c
index f4996b0..38b9c73 100644
--- a/drivers/block/nvme.c
+++ b/drivers/block/nvme.c
@@ -1344,6 +1344,7 @@ static struct nvme_ns *nvme_alloc_ns(struct nvme_dev *dev, int nsid,
     ns->disk = disk;
     lbaf = id->flbas & 0xf;
     ns->lba_shift = id->lbaf[lbaf].ds;
+     blk_queue_logical_block_size(ns->queue, 1 << ns->lba_shift);
      disk->major = nvme_major;
     disk->minors = NVME_MINORS;
--
1.7.0.4

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://merlin.infradead.org/pipermail/linux-nvme/attachments/20120724/cf1a7436/attachment.html>

^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH] NVMe: Set request queue logical block size
@ 2012-07-24 21:01 Keith Busch
  0 siblings, 0 replies; 5+ messages in thread
From: Keith Busch @ 2012-07-24 21:01 UTC (permalink / raw)


From: Keith Busch <keith.busch@intel.com>

Sets the request queue logical block size with the block size of the namespace.

Signed-off-by: Keith Busch <keith.busch at intel.com>
---
 drivers/block/nvme.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c
index f4996b0..38b9c73 100644
--- a/drivers/block/nvme.c
+++ b/drivers/block/nvme.c
@@ -1344,6 +1344,7 @@ static struct nvme_ns *nvme_alloc_ns(struct nvme_dev *dev, int nsid,
 	ns->disk = disk;
 	lbaf = id->flbas & 0xf;
 	ns->lba_shift = id->lbaf[lbaf].ds;
+	blk_queue_logical_block_size(ns->queue, 1 << ns->lba_shift);
 
 	disk->major = nvme_major;
 	disk->minors = NVME_MINORS;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH] NVMe: Set request queue logical block size
@ 2012-07-25 15:59 Keith Busch
  2012-07-25 18:56 ` Matthew Wilcox
  0 siblings, 1 reply; 5+ messages in thread
From: Keith Busch @ 2012-07-25 15:59 UTC (permalink / raw)


Sets the request queue logical block size with the block size of the namespace.

Signed-off-by: Keith Busch <keith.busch at intel.com>
---
 drivers/block/nvme.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c
index f4996b0..38b9c73 100644
--- a/drivers/block/nvme.c
+++ b/drivers/block/nvme.c
@@ -1344,6 +1344,7 @@ static struct nvme_ns *nvme_alloc_ns(struct nvme_dev *dev, int nsid,
 	ns->disk = disk;
 	lbaf = id->flbas & 0xf;
 	ns->lba_shift = id->lbaf[lbaf].ds;
+	blk_queue_logical_block_size(ns->queue, 1 << ns->lba_shift);
 
 	disk->major = nvme_major;
 	disk->minors = NVME_MINORS;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-07-25 18:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-24 19:26 [PATCH] NVMe: Set request queue logical block size Busch, Keith
2012-07-24 19:55 ` Matthew Wilcox
  -- strict thread matches above, loose matches on Subject: below --
2012-07-24 21:01 Keith Busch
2012-07-25 15:59 Keith Busch
2012-07-25 18:56 ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).