From c9042de70e93159c02bd94f5b2d92c27157767cb Mon Sep 17 00:00:00 2001 From: Alexander Zarochentsev Date: Fri, 2 Feb 2024 16:39:39 +0000 Subject: [PATCH] LU-13582 out: make tx abort verbose A distributed transaction abort and rollback of already done updates indicates insufficient locking or fs metadata inconsistency and should be reported to the console at least as a warning. Signed-off-by: Alexander Zarochentsev Change-Id: Id1127d422d19725eeb425e028ff854769cf312d5 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53891 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andrew Perepechko Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin --- lustre/target/out_handler.c | 6 +++--- lustre/target/update_recovery.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lustre/target/out_handler.c b/lustre/target/out_handler.c index 58b829c..02944d0 100644 --- a/lustre/target/out_handler.c +++ b/lustre/target/out_handler.c @@ -906,9 +906,9 @@ static int out_tx_end(const struct lu_env *env, struct thandle_exec_args *ta, rc = ta->ta_args[i]->exec_fn(env, ta->ta_handle, ta->ta_args[i]); if (unlikely(rc != 0)) { - CDEBUG(D_INFO, "error during execution of #%u from" - " %s:%d: rc = %d\n", i, ta->ta_args[i]->file, - ta->ta_args[i]->line, rc); + CWARN("%s: error during execution of #%u from %s:%d: rc = %d\n", + dt_obd_name(ta->ta_handle->th_dev), i, + ta->ta_args[i]->file, ta->ta_args[i]->line, rc); while (--i >= 0) { if (ta->ta_args[i]->undo_fn != NULL) ta->ta_args[i]->undo_fn(env, diff --git a/lustre/target/update_recovery.c b/lustre/target/update_recovery.c index b29945b..6f2c6b6 100644 --- a/lustre/target/update_recovery.c +++ b/lustre/target/update_recovery.c @@ -1380,9 +1380,9 @@ int distribute_txn_replay_handle(struct lu_env *env, st->st_sub_th, dtrq, ta_arg); if (unlikely(rc < 0)) { - CDEBUG(D_HA, "error during execution of #%u from" - " %s:%d: rc = %d\n", i, ta->ta_args[i]->file, - ta->ta_args[i]->line, rc); + CWARN("%s: error during execution of #%u from %s:%d: rc = %d\n", + dt_obd_name(ta->ta_handle->th_dev), i, + ta->ta_args[i]->file, ta->ta_args[i]->line, rc); while (--i > 0) { if (ta->ta_args[i]->undo_fn != NULL) { dt_obj = ta->ta_args[i]->object; -- 1.8.3.1