From 1778937145af1bbdf50b05c8d1305619ea7bb6ac Mon Sep 17 00:00:00 2001 From: yury Date: Wed, 12 Nov 2008 11:59:48 +0000 Subject: [PATCH] b=17037 r=tappro,wangdi - fixes ost cleanup issue due to missed llcd_put() in the case ost does not receive disconnect from mds; - do not sleep on hanging llcd. Instead assert on it _after_ stopping recov_thread's ptlrpcd which should kill any remeining llcds; - fixes and cleanups, comments. --- lustre/osc/osc_request.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 301b54b..ee4b785 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -3782,14 +3782,21 @@ static int osc_reconnect(struct obd_export *exp, struct obd_device *obd, static int osc_disconnect(struct obd_export *exp) { struct obd_device *obd = class_exp2obd(exp); - struct llog_ctxt *ctxt = llog_get_context(obd, LLOG_SIZE_REPL_CTXT); + struct llog_ctxt *ctxt; int rc; - if (obd->u.cli.cl_conn_count == 1) - /* flush any remaining cancel messages out to the target */ - llog_sync(ctxt, exp); - - llog_ctxt_put(ctxt); + ctxt = llog_get_context(obd, LLOG_SIZE_REPL_CTXT); + if (ctxt) { + if (obd->u.cli.cl_conn_count == 1) { + /* Flush any remaining cancel messages out to the + * target */ + llog_sync(ctxt, exp); + } + llog_ctxt_put(ctxt); + } else { + CDEBUG(D_HA, "No LLOG_SIZE_REPL_CTXT found in obd %p\n", + obd); + } rc = client_disconnect_export(exp); return rc; -- 1.8.3.1