From cd63fe9eae5881b29d2c23c64576e483a2ef64c3 Mon Sep 17 00:00:00 2001 From: Timothy Day Date: Wed, 26 Feb 2025 00:14:49 -0500 Subject: [PATCH] LU-18753 ptlrpc: remove unused stub functions 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 Change-Id: Ib45aba0b76d086b0a657bb3fc79d1ec74b1e3302 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58226 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Aurelien Degremont Reviewed-by: Max Wang Reviewed-by: James Simmons Reviewed-by: Arshad Hussain Reviewed-by: Oleg Drokin --- lustre/ptlrpc/client.c | 6 ------ lustre/ptlrpc/pack_generic.c | 21 --------------------- lustre/ptlrpc/pinger.c | 5 ----- lustre/ptlrpc/ptlrpc_internal.h | 1 - lustre/ptlrpc/sec.c | 6 ------ 5 files changed, 39 deletions(-) diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index aa998b0..5b92485 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -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 diff --git a/lustre/ptlrpc/pack_generic.c b/lustre/ptlrpc/pack_generic.c index 6ab0ed7..8753b93 100644 --- a/lustre/ptlrpc/pack_generic.c +++ b/lustre/ptlrpc/pack_generic.c @@ -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, diff --git a/lustre/ptlrpc/pinger.c b/lustre/ptlrpc/pinger.c index ff4b2ba..3d0f8ba 100644 --- a/lustre/ptlrpc/pinger.c +++ b/lustre/ptlrpc/pinger.c @@ -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 || diff --git a/lustre/ptlrpc/ptlrpc_internal.h b/lustre/ptlrpc/ptlrpc_internal.h index 46ae265..1574c08 100644 --- a/lustre/ptlrpc/ptlrpc_internal.h +++ b/lustre/ptlrpc/ptlrpc_internal.h @@ -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 */ diff --git a/lustre/ptlrpc/sec.c b/lustre/ptlrpc/sec.c index 5a3b354..34361df 100644 --- a/lustre/ptlrpc/sec.c +++ b/lustre/ptlrpc/sec.c @@ -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. -- 1.8.3.1