Blob Blame History Raw
From: Daniel Gomez <da.gomez@samsung.com>
Date: Tue, 30 May 2023 15:42:53 +0000
Subject: nvme: Increase block size variable size to 32-bit
Patch-mainline: v6.5-rc1
Git-commit: bdbfcd5f6caa46e1ddbfd60cbf694d192b37805a
References: jsc#PED-6252 jsc#PED-5728 jsc#PED-5062 jsc#PED-3535

Increase block size variable size to 32-bit unsigned to be able to
support block devices larger than 32k (starting from 64 KiB).

Physical and logical block size already support unsigned 32-bit.

Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Acked-by: Daniel Wagner <dwagner@suse.de>
---
 drivers/nvme/host/core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1879,7 +1879,7 @@ static void nvme_update_disk_info(struct
 		struct nvme_ns *ns, struct nvme_id_ns *id)
 {
 	sector_t capacity = nvme_lba_to_sect(ns, le64_to_cpu(id->nsze));
-	unsigned short bs = 1 << ns->lba_shift;
+	u32 bs = 1U << ns->lba_shift;
 	u32 atomic_bs, phys_bs, io_opt = 0;
 
 	/*