From d13151733f4fd460fa84f57185a2f931dce8604c Mon Sep 17 00:00:00 2001 From: Timothy Day Date: Sat, 15 Mar 2025 01:06:19 -0400 Subject: [PATCH] LU-16518 osp: remove unused osp_txn_info() and friends The 'struct osp_txn_info' is no longer used anywhere. So we no longer need to store this on OSP threads. Fixes: 0ba690a526be ("LU-7251 osp: do not assign commit callback to every thandle") Test-Parameters: trivial Signed-off-by: Timothy Day Change-Id: I8dd5c20c8a9e667aa1ff98cc53430f44f8376ef9 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58412 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Arshad Hussain Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin --- lustre/osp/osp_dev.c | 11 ++--------- lustre/osp/osp_internal.h | 14 -------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/lustre/osp/osp_dev.c b/lustre/osp/osp_dev.c index bf54999..177f110 100644 --- a/lustre/osp/osp_dev.c +++ b/lustre/osp/osp_dev.c @@ -1807,6 +1807,7 @@ static int osp_obd_set_info_async(const struct lu_env *env, /* context key constructor/destructor: mdt_key_init, mdt_key_fini */ LU_KEY_INIT_FINI(osp, struct osp_thread_info); + static void osp_key_exit(const struct lu_context *ctx, struct lu_context_key *key, void *data) { @@ -1822,15 +1823,7 @@ struct lu_context_key osp_thread_key = { .lct_exit = osp_key_exit }; -/* context key constructor/destructor: mdt_txn_key_init, mdt_txn_key_fini */ -LU_KEY_INIT_FINI(osp_txn, struct osp_txn_info); - -struct lu_context_key osp_txn_key = { - .lct_tags = LCT_OSP_THREAD, - .lct_init = osp_txn_key_init, - .lct_fini = osp_txn_key_fini -}; -LU_TYPE_INIT_FINI(osp, &osp_thread_key, &osp_txn_key); +LU_TYPE_INIT_FINI(osp, &osp_thread_key); static const struct lu_device_type_operations osp_device_type_ops = { .ldto_init = osp_type_init, diff --git a/lustre/osp/osp_internal.h b/lustre/osp/osp_internal.h index 99022fc..12fa688 100644 --- a/lustre/osp/osp_internal.h +++ b/lustre/osp/osp_internal.h @@ -437,20 +437,6 @@ static inline struct osp_thread_info *osp_env_info(const struct lu_env *env) return lu_env_info(env, &osp_thread_key); } -struct osp_txn_info { - __u64 oti_current_id; -}; - -extern struct lu_context_key osp_txn_key; - -static inline struct osp_txn_info *osp_txn_info(struct lu_context *ctx) -{ - struct osp_txn_info *info; - - info = lu_context_key_get(ctx, &osp_txn_key); - return info; -} - extern const struct lu_device_operations osp_lu_ops; static inline int lu_device_is_osp(struct lu_device *d) -- 1.8.3.1