[dm-devel] [PATCH 5/5] libmpathpersist: cleanup mpathpr.h

mwilck at suse.com mwilck at suse.com
Thu Dec 16 12:55:02 UTC 2021


From: Martin Wilck <mwilck at suse.com>

>From now on this header contains only symbols that need to be
accessed from multiple sources of libmpathpersist, but not from
libmultipath or other source files (those go into
libmpathpersist_int.h).

Signed-off-by: Martin Wilck <mwilck at suse.com>
---
 libmpathpersist/mpath_persist_int.c | 14 +++++++++++
 libmpathpersist/mpathpr.h           | 37 ++++-------------------------
 2 files changed, 18 insertions(+), 33 deletions(-)

diff --git a/libmpathpersist/mpath_persist_int.c b/libmpathpersist/mpath_persist_int.c
index 91bc35a..c6fc287 100644
--- a/libmpathpersist/mpath_persist_int.c
+++ b/libmpathpersist/mpath_persist_int.c
@@ -33,7 +33,21 @@
 #include "mpathpr.h"
 #include "mpath_pr_ioctl.h"
 
+struct prout_param {
+	char dev[FILE_NAME_SIZE];
+	int rq_servact;
+	int rq_scope;
+	unsigned int rq_type;
+	struct prout_param_descriptor  *paramp;
+	int noisy;
+	int status;
+};
 
+struct threadinfo {
+	int status;
+	pthread_t id;
+	struct prout_param param;
+};
 
 static int mpath_send_prin_activepath (char * dev, int rq_servact,
 				struct prin_resp * resp, int noisy)
diff --git a/libmpathpersist/mpathpr.h b/libmpathpersist/mpathpr.h
index 59411e6..39a7d8e 100644
--- a/libmpathpersist/mpathpr.h
+++ b/libmpathpersist/mpathpr.h
@@ -1,42 +1,13 @@
 #ifndef MPATHPR_H
 #define MPATHPR_H
 
-#include "structs.h" /* FILE_NAME_SIZE */
-
-struct prin_param {
-	char dev[FILE_NAME_SIZE];
-	int rq_servact;
-	struct prin_resp *resp;
-	int noisy;
-	int status;
-};
-
-struct prout_param {
-	char dev[FILE_NAME_SIZE];
-	int rq_servact;
-	int rq_scope;
-	unsigned int rq_type;
-	struct prout_param_descriptor  *paramp;
-	int noisy;
-	int status;
-};
-
-struct threadinfo {
-	int status;
-	pthread_t id;
-	struct prout_param param;
-};
-
-int prin_do_scsi_ioctl(char * dev, int rq_servact, struct prin_resp * resp, int noisy);
-int prout_do_scsi_ioctl( char * dev, int rq_servact, int rq_scope,
-		unsigned int rq_type, struct prout_param_descriptor *paramp, int noisy);
-void * _mpath_pr_update (void *arg);
-void dumpHex(const char* , int len, int no_ascii);
+/*
+ * This header file contains symbols that are only used by
+ * libmpathpersist internally.
+ */
 
 int update_prflag(char *mapname, int set);
 int update_prkey_flags(char *mapname, uint64_t prkey, uint8_t sa_flags);
 #define update_prkey(mapname, prkey) update_prkey_flags(mapname, prkey, 0)
-void * mpath_alloc_prin_response(int prin_sa);
-int update_map_pr(struct multipath *mpp);
 
 #endif
-- 
2.34.1





More information about the dm-devel mailing list