Whamcloud - gitweb
LU-18753 ptlrpc: remove unused stub functions 26/58226/2
authorTimothy Day <timday@amazon.com>
Wed, 26 Feb 2025 05:14:49 +0000 (00:14 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 6 Mar 2025 08:10:38 +0000 (08:10 +0000)
Remove:

ptlrpc_ping_import_soon()
flavor_copy()
ptlrpc_cleanup_client()
__lustre_swab_buf()

They are not called anywhere.

Fixes: 86b2211e55dc ("LU-290 Reconnects are not throttled")
Fixes: 3565394baa95 ("LU-3289 gss: Add userspace support for GSS null and sk")
Fixes: 3ee0e0908f12 ("LU-5829 ptlrpc: remove unnecessary EXPORT_SYMBOL")
Fixes: 23fad25a5b6b ("b=18631")
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ib45aba0b76d086b0a657bb3fc79d1ec74b1e3302
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58226
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Max Wang <wamax@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ptlrpc/client.c
lustre/ptlrpc/pack_generic.c
lustre/ptlrpc/pinger.c
lustre/ptlrpc/ptlrpc_internal.h
lustre/ptlrpc/sec.c

index aa998b0..5b92485 100644 (file)
@@ -3038,12 +3038,6 @@ out:
        EXIT;
 }
 
-void ptlrpc_cleanup_client(struct obd_import *imp)
-{
-       ENTRY;
-       EXIT;
-}
-
 /**
  * Schedule previously sent request for resend.
  * For bulk requests we assign new xid (to avoid problems with
index 6ab0ed7..8753b93 100644 (file)
@@ -808,27 +808,6 @@ char *lustre_msg_string(struct lustre_msg *m, __u32 index, __u32 max_len)
        return str;
 }
 
-/* Wrap up the normal fixed length cases */
-static inline void *__lustre_swab_buf(struct lustre_msg *msg, __u32 index,
-                                     __u32 min_size, void *swabber)
-{
-       void *ptr = NULL;
-
-       LASSERT(msg != NULL);
-       switch (msg->lm_magic) {
-       case LUSTRE_MSG_MAGIC_V2:
-               ptr = lustre_msg_buf_v2(msg, index, min_size);
-               break;
-       default:
-               CERROR("incorrect message magic: %08x\n", msg->lm_magic);
-       }
-
-       if (ptr != NULL && swabber != NULL)
-               ((void (*)(void *))swabber)(ptr);
-
-       return ptr;
-}
-
 static inline struct ptlrpc_body *lustre_msg_ptlrpc_body(struct lustre_msg *msg)
 {
        return lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF,
index ff4b2ba..3d0f8ba 100644 (file)
@@ -142,11 +142,6 @@ static int ptlrpc_ping(struct obd_import *imp)
        RETURN(0);
 }
 
-void ptlrpc_ping_import_soon(struct obd_import *imp)
-{
-       imp->imp_next_ping = ktime_get_seconds();
-}
-
 static inline int imp_is_deactive(struct obd_import *imp)
 {
        return imp->imp_deactive ||
index 46ae265..1574c08 100644 (file)
@@ -261,7 +261,6 @@ int ptlrpc_stop_pinger(void);
 void ptlrpc_pinger_sending_on_import(struct obd_import *imp);
 void ptlrpc_pinger_commit_expected(struct obd_import *imp);
 void ptlrpc_pinger_wake_up(void);
-void ptlrpc_ping_import_soon(struct obd_import *imp);
 int ping_evictor_wake(struct obd_export *exp);
 
 /* sec_null.c */
index 5a3b354..34361df 100644 (file)
@@ -1516,12 +1516,6 @@ int flavor_equal(struct sptlrpc_flavor *sf1, struct sptlrpc_flavor *sf2)
        return (memcmp(sf1, sf2, sizeof(*sf1)) == 0);
 }
 
-static inline
-void flavor_copy(struct sptlrpc_flavor *dst, struct sptlrpc_flavor *src)
-{
-       *dst = *src;
-}
-
 /**
  * To get an appropriate ptlrpc_sec for the \a imp, according to the current
  * configuration. Upon called, imp->imp_sec may or may not be NULL.