From 5f2c0ad523f37f186e5c60a1d2b532848563f355 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 4 Sep 2005 22:21:50 +0000 Subject: [PATCH] b=7273 - additional debug info --- lustre/mds/handler.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 026ce22..2e59dab 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -3808,15 +3808,21 @@ int mds_postrecov_common(struct obd_device *obd) struct mds_obd *mds = &obd->u.mds; struct llog_ctxt *ctxt; int rc, item = 0, valsize; + struct timeval tstart, now; __u32 group; ENTRY; + CDEBUG(D_ERROR, "%s: post-recovery\n", obd->obd_name); LASSERT(!obd->obd_recovering); ctxt = llog_get_context(&obd->obd_llogs, LLOG_UNLINK_ORIG_CTXT); LASSERT(ctxt != NULL); /* clean PENDING dir */ + do_gettimeofday(&tstart); rc = mds_cleanup_orphans(obd); + do_gettimeofday(&now); + CDEBUG(D_ERROR, "%s: cleaned %d MDS orphans in %us\n", + obd->obd_name, rc, (unsigned) (now.tv_sec - tstart.tv_sec)); if (rc < 0) GOTO(out, rc); item = rc; @@ -3825,8 +3831,11 @@ int mds_postrecov_common(struct obd_device *obd) valsize = sizeof(group); rc = obd_set_info(mds->mds_dt_exp, strlen("mds_conn"), "mds_conn", valsize, &group); - if (rc) + if (rc) { + CERROR("%s: failed to obd_set_info(): %d\n", + obd->obd_name, rc); GOTO(out, rc); + } rc = llog_connect(ctxt, obd->u.mds.mds_dt_desc.ld_tgt_count, NULL, NULL, NULL); @@ -3837,9 +3846,16 @@ int mds_postrecov_common(struct obd_device *obd) } /* remove the orphaned precreated objects */ + do_gettimeofday(&tstart); rc = mds_dt_clear_orphans(mds, NULL /* all OSTs */); - if (rc) + do_gettimeofday(&now); + CDEBUG(D_ERROR, "%s: cleaned OSS orphans in %us: %d\n", + obd->obd_name, (unsigned) (now.tv_sec - tstart.tv_sec), rc); + if (rc) { + CERROR("%s: can't clear OSS orphans: %d\n", + obd->obd_name, rc); GOTO(err_llog, rc); + } out: RETURN(rc < 0 ? rc : item); -- 1.8.3.1