From 5b74e0466edbfbbf9f336171de1adc5e583e9475 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Thu, 18 Jun 2020 10:00:26 +0300 Subject: [PATCH] LU-13195 obdclass: show FID for corrupted llog to be able to remove that easily. Signed-off-by: Alex Zhuravlev Change-Id: Iefead860b5e60e74e0eb445f715508a3b01fac87 Reviewed-on: https://review.whamcloud.com/38977 Tested-by: jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin --- lustre/include/dt_object.h | 3 ++- lustre/obdclass/llog_osd.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lustre/include/dt_object.h b/lustre/include/dt_object.h index 264d161..45b136a 100644 --- a/lustre/include/dt_object.h +++ b/lustre/include/dt_object.h @@ -2257,7 +2257,8 @@ static inline int dt_declare_record_write(const struct lu_env *env, LASSERTF(dt != NULL, "dt is NULL when we want to write record\n"); LASSERT(th != NULL); - LASSERT(dt->do_body_ops); + LASSERTF(dt->do_body_ops, DFID" doesn't exit\n", + PFID(lu_object_fid(&dt->do_lu))); LASSERT(dt->do_body_ops->dbo_declare_write); rc = dt->do_body_ops->dbo_declare_write(env, dt, buf, pos, th); return rc; diff --git a/lustre/obdclass/llog_osd.c b/lustre/obdclass/llog_osd.c index 09246e50..51829c8 100644 --- a/lustre/obdclass/llog_osd.c +++ b/lustre/obdclass/llog_osd.c @@ -612,8 +612,9 @@ static int llog_osd_write_rec(const struct lu_env *env, * update/cancel, the llh_count and llh_bitmap are protected */ mutex_lock(&loghandle->lgh_hdr_mutex); if (__test_and_set_bit_le(index, LLOG_HDR_BITMAP(llh))) { - CERROR("%s: index %u already set in log bitmap\n", - o->do_lu.lo_dev->ld_obd->obd_name, index); + CERROR("%s: index %u already set in llog bitmap "DFID"\n", + o->do_lu.lo_dev->ld_obd->obd_name, index, + PFID(lu_object_fid(&o->do_lu))); mutex_unlock(&loghandle->lgh_hdr_mutex); LBUG(); /* should never happen */ } -- 1.8.3.1