From efbcbf618ea4ed75a82ed48cd0be586701f2391a Mon Sep 17 00:00:00 2001 From: Timothy Day Date: Wed, 26 Feb 2025 00:49:41 -0500 Subject: [PATCH] LU-18753 mdt: remove mdt_buf code Remove unused MDT buffer code, including mdt_buf() and mdt_buf_const(). Fixes: 26b823865997 ("LU-3105 osd: remove capa related stuff from servers") Test-Parameters: trivial Signed-off-by: Timothy Day Change-Id: I7c0ffc820e94886902a1dbf09e01d70761f7d8fd Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58228 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/mdt/mdt_internal.h | 4 ---- lustre/mdt/mdt_recovery.c | 26 -------------------------- 2 files changed, 30 deletions(-) diff --git a/lustre/mdt/mdt_internal.h b/lustre/mdt/mdt_internal.h index fd51dc9..56d590d 100644 --- a/lustre/mdt/mdt_internal.h +++ b/lustre/mdt/mdt_internal.h @@ -944,10 +944,6 @@ int find_name_matching_hash(struct mdt_thread_info *info, struct lu_name *lname, struct mdt_object *parent, struct mdt_object *child); int mdt_device_sync(const struct lu_env *env, struct mdt_device *mdt); -struct lu_buf *mdt_buf(const struct lu_env *env, void *area, ssize_t len); -const struct lu_buf *mdt_buf_const(const struct lu_env *env, - const void *area, ssize_t len); - void mdt_dump_lmm(int level, const struct lov_mds_md *lmm, __u64 valid); void mdt_dump_lmv(unsigned int level, const union lmv_mds_md *lmv); diff --git a/lustre/mdt/mdt_recovery.c b/lustre/mdt/mdt_recovery.c index 94b2e0e..579dc22 100644 --- a/lustre/mdt/mdt_recovery.c +++ b/lustre/mdt/mdt_recovery.c @@ -20,32 +20,6 @@ #include "mdt_internal.h" -struct lu_buf *mdt_buf(const struct lu_env *env, void *area, ssize_t len) -{ - struct lu_buf *buf; - struct mdt_thread_info *mti; - - mti = lu_context_key_get(&env->le_ctx, &mdt_thread_key); - buf = &mti->mti_buf; - buf->lb_buf = area; - buf->lb_len = len; - return buf; -} - -const struct lu_buf *mdt_buf_const(const struct lu_env *env, - const void *area, ssize_t len) -{ - struct lu_buf *buf; - struct mdt_thread_info *mti; - - mti = lu_context_key_get(&env->le_ctx, &mdt_thread_key); - buf = &mti->mti_buf; - - buf->lb_buf = (void *)area; - buf->lb_len = len; - return buf; -} - /* reconstruction code */ static void mdt_steal_ack_locks(struct ptlrpc_request *req) { -- 1.8.3.1