Thread (3 messages) 3 messages, 3 authors, 2021-08-09

Re: [PATCH] Formatted LBA SIZE[FLBAS]

From: Keith Busch <kbusch@kernel.org>
Date: 2021-08-09 14:49:11

On Tue, Aug 03, 2021 at 10:59:12AM +0530, Sathyavathi M wrote:
quoted hunk ↗ jump to hunk
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 11779be..49cca79 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1683,6 +1683,9 @@ static int nvme_setup_streams_ns(struct nvme_ctrl *ctrl, struct nvme_ns *ns,
 static int nvme_configure_metadata(struct nvme_ns *ns, struct nvme_id_ns *id)
 {
 	struct nvme_ctrl *ctrl = ns->ctrl;
+	unsigned ls_lbaf = id->flbas & NVME_NS_FLBAS_LBA_LSMASK;
+	unsigned ms_lbaf = (id->flbas & NVME_NS_FLBAS_LBA_MSMASK) >> 1;
+	unsigned lbaf = ms_lbaf | ls_lbaf;
I don't think you tested this. In addition to what Niklas mentioned, the
above is useless without informing the controller the host supports the
extended LBA format. You have to enable that in the Host Behavior
Support feature LBAFEE field.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help