From: Hannes Reinecke <hare@suse.de>
Date: Tue, 31 Jul 2018 15:06:51 +0200
Subject: [PATCH] nvme: kABI fix for ANA support in nvme_ctrl
References: bsc#1054245
Patch-Mainline: never, kABI fix
Guard additional fields in nvme_ctrl.
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
drivers/nvme/host/nvme.h | 44 +++++++++++++++++++++++++-------------------
1 file changed, 25 insertions(+), 19 deletions(-)
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 5ff3d1fc8df3..5856616a5abc 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -173,7 +173,6 @@ struct nvme_ctrl {
u16 oacs;
u16 nssa;
u16 nr_streams;
- u32 max_namespaces;
atomic_t abort_limit;
u8 vwc;
u32 vs;
@@ -194,19 +193,6 @@ struct nvme_ctrl {
struct nvme_command ka_cmd;
struct work_struct fw_act_work;
-#ifdef CONFIG_NVME_MULTIPATH
- /* asymmetric namespace access: */
- u8 anacap;
- u8 anatt;
- u32 anagrpmax;
- u32 nanagrpid;
- struct mutex ana_lock;
- struct nvme_ana_rsp_hdr *ana_log_buf;
- size_t ana_log_size;
- struct timer_list anatt_timer;
- struct work_struct ana_work;
-#endif
-
/* Power saving configuration */
u64 ps_max_latency_us;
bool apst_enabled;
@@ -228,6 +214,20 @@ struct nvme_ctrl {
#ifndef __GENKSYMS__
u32 oaes;
unsigned long events;
+ u32 max_namespaces;
+
+#ifdef CONFIG_NVME_MULTIPATH
+ /* asymmetric namespace access: */
+ u8 anacap;
+ u8 anatt;
+ u32 anagrpmax;
+ u32 nanagrpid;
+ struct mutex ana_lock;
+ struct nvme_ana_rsp_hdr *ana_log_buf;
+ size_t ana_log_size;
+ struct timer_list anatt_timer;
+ struct work_struct ana_work;
+#endif
#endif
};
@@ -275,7 +275,6 @@ struct nvme_ns_head {
struct bio_list requeue_list;
spinlock_t requeue_lock;
struct work_struct requeue_work;
- struct mutex lock;
#endif
struct list_head list;
struct srcu_struct srcu;
@@ -285,6 +284,11 @@ struct nvme_ns_head {
struct list_head entry;
struct kref ref;
int instance;
+#ifndef __GENKSYMS__
+#ifdef CONFIG_NVME_MULTIPATH
+ struct mutex lock;
+#endif
+#endif
};
struct nvme_ns {
@@ -293,10 +297,6 @@ struct nvme_ns {
struct nvme_ctrl *ctrl;
struct request_queue *queue;
struct gendisk *disk;
-#ifdef CONFIG_NVME_MULTIPATH
- enum nvme_ana_state ana_state;
- u32 ana_grpid;
-#endif
struct list_head siblings;
struct nvm_dev *ndev;
struct kref kref;
@@ -313,6 +313,12 @@ struct nvme_ns {
#define NVME_NS_DEAD 1
#define NVME_NS_ANA_PENDING 2
u16 noiob;
+#ifndef __GENKSYMS__
+#ifdef CONFIG_NVME_MULTIPATH
+ enum nvme_ana_state ana_state;
+ u32 ana_grpid;
+#endif
+#endif
};
struct nvme_ctrl_ops {
--
2.12.3