From b19d6c175170b42a195297de4393730c68306946 Mon Sep 17 00:00:00 2001 From: tappro Date: Tue, 5 Dec 2006 16:34:46 +0000 Subject: [PATCH] - small debug and cleanups --- lustre/fld/fld_request.c | 6 ++---- lustre/ldlm/ldlm_lib.c | 4 ++-- lustre/lov/lov_obd.c | 3 +-- lustre/mdd/mdd_device.c | 8 ++++---- lustre/mdt/mdt_handler.c | 3 ++- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/lustre/fld/fld_request.c b/lustre/fld/fld_request.c index 849d536..b669554 100644 --- a/lustre/fld/fld_request.c +++ b/lustre/fld/fld_request.c @@ -455,12 +455,10 @@ int fld_client_create(struct lu_client_fld *fld, #ifdef __KERNEL__ if (target->ft_srv != NULL) { LASSERT(env != NULL); - rc = fld_server_create(target->ft_srv, - env, seq, mds); + rc = fld_server_create(target->ft_srv, env, seq, mds); } else { #endif - rc = fld_client_rpc(target->ft_exp, - &md_fld, FLD_CREATE); + rc = fld_client_rpc(target->ft_exp, &md_fld, FLD_CREATE); #ifdef __KERNEL__ } #endif diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 6a17c67..b1049cd 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -1569,7 +1569,7 @@ int target_queue_recovery_request(struct ptlrpc_request *req, if (obd->obd_recovery_data.trd_processing_task == current->pid) { /* Processing the queue right now, don't re-add. */ - return 1; + RETURN (1); } target_process_req_flags(obd, req); @@ -1606,7 +1606,7 @@ int target_queue_recovery_request(struct ptlrpc_request *req, if (!transno) { CFS_INIT_LIST_HEAD(&req->rq_list); DEBUG_REQ(D_HA, req, "not queueing"); - return 1; + RETURN (1); } spin_lock_bh(&obd->obd_processing_task_lock); diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index 2f51851..d0d9dee 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -236,8 +236,7 @@ static int lov_connect(const struct lu_env *env, if (!tgt || obd_uuid_empty(&tgt->ltd_uuid)) continue; /* Flags will be lowest common denominator */ - rc = lov_connect_obd(obd, i, lov->lov_tgts[i]->ltd_activate, - &lov->lov_ocd); + rc = lov_connect_obd(obd, i, tgt->ltd_activate, &lov->lov_ocd); if (rc) { CERROR("%s: lov connect tgt %d failed: %d\n", obd->obd_name, i, rc); diff --git a/lustre/mdd/mdd_device.c b/lustre/mdd/mdd_device.c index 493c0e2..251bbdb 100644 --- a/lustre/mdd/mdd_device.c +++ b/lustre/mdd/mdd_device.c @@ -196,11 +196,11 @@ static int mdd_recovery_complete(const struct lu_env *env, RETURN(rc); } #endif - obd_notify(obd->u.mds.mds_osc_obd, NULL, - (obd->obd_async_recov ? - OBD_NOTIFY_SYNC_NONBLOCK : - OBD_NOTIFY_SYNC), NULL); + /* Call that with obd_recovering = 1 just to update objids */ + obd_notify(obd->u.mds.mds_osc_obd, NULL, (obd->obd_async_recov ? + OBD_NOTIFY_SYNC_NONBLOCK : OBD_NOTIFY_SYNC), NULL); + /* Drop obd_recovering to 0 and call o_postrecov to recover mds_lov */ obd->obd_recovering = 0; obd->obd_type->typ_dt_ops->o_postrecov(obd); diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 51b3293..44187dd 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -2177,7 +2177,8 @@ static int mdt_recovery(struct mdt_thread_info *info) if (!(lustre_msg_get_flags(req->rq_reqmsg) & (MSG_RESENT | MSG_REPLAY))) { DEBUG_REQ(D_WARNING, req, "rq_xid "LPU64" matches last_xid, " - "expected REPLAY or RESENT flag\n", req->rq_xid); + "expected REPLAY or RESENT flag (%x)\n", req->rq_xid, + lustre_msg_get_flags(req->rq_reqmsg)); LBUG(); req->rq_status = -ENOTCONN; RETURN(-ENOTCONN); -- 1.8.3.1