[PATCH 1/2] nvme/host: move nvme_ns_info into nvme header file
Alex Tran
alex.t.tran at gmail.com
Sun Dec 21 13:26:10 PST 2025
The nvme_ns_info struct is moved into the nvme header file.
This is done because it is used as a field in the nvme_ns struct
to store the pending info being used in the following patch.
Signed-off-by: Alex Tran <alex.t.tran at gmail.com>
---
drivers/nvme/host/core.c | 15 ---------------
drivers/nvme/host/nvme.h | 15 +++++++++++++++
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 7bf228df6001f1f4d0b3c570de285a5eb17bb08e..fab321e79b7cdbb89d96d950c1cc8c1128906770 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -33,21 +33,6 @@
#define NVME_MINORS (1U << MINORBITS)
-struct nvme_ns_info {
- struct nvme_ns_ids ids;
- u32 nsid;
- __le32 anagrpid;
- u8 pi_offset;
- u16 endgid;
- u64 runs;
- bool is_shared;
- bool is_readonly;
- bool is_ready;
- bool is_removed;
- bool is_rotational;
- bool no_vwc;
-};
-
unsigned int admin_timeout = 60;
module_param(admin_timeout, uint, 0644);
MODULE_PARM_DESC(admin_timeout, "timeout in seconds for admin commands");
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 9a5f28c5103c5c42777bd9309a983ef0196c1b95..ff4e7213131298a1a019eaa3822ca26f857b2443 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -525,6 +525,21 @@ enum nvme_ns_features {
NVME_NS_DEAC = 1 << 2, /* DEAC bit in Write Zeroes supported */
};
+struct nvme_ns_info {
+ struct nvme_ns_ids ids;
+ u32 nsid;
+ __le32 anagrpid;
+ u8 pi_offset;
+ u16 endgid;
+ u64 runs;
+ bool is_shared;
+ bool is_readonly;
+ bool is_ready;
+ bool is_removed;
+ bool is_rotational;
+ bool no_vwc;
+};
+
struct nvme_ns {
struct list_head list;
--
2.51.0
More information about the Linux-nvme
mailing list