From 436360e8a7b72b9657bd4df79d11dabe5e03b9bb Mon Sep 17 00:00:00 2001 From: pschwan Date: Wed, 13 Nov 2002 19:31:42 +0000 Subject: [PATCH] - Updated changelog - Better errors when the LDLM service can't be started - Remove unnecessary flag from OSC lock cancellation in clear_inode - If lov_enqueue fails to allocate a lock, zero the handle, so that we don't try to decref a bad handle (and LBUG) later --- lustre/ChangeLog | 1 + lustre/ldlm/ldlm_lockd.c | 8 ++++++-- lustre/llite/super.c | 3 +-- lustre/lov/lov_obd.c | 4 +++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 3421e0e..d2ac804 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -15,6 +15,7 @@ TBD - data locks weren't cancelled at clear_inode time (290, 311) - intent locks could lead to unbounded lock growth (205) - added a maximum lock count, an LRU list, and a flusher + - fix multiple rename (365) * protocol change - Add capability to MDS protocol - LDLM cancellations and callbacks on different portals diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index 739b609..973d565 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -606,8 +606,10 @@ static int ldlm_setup(struct obd_device *obddev, obd_count len, void *buf) LDLM_CB_REPLY_PORTAL, "self", ldlm_callback_handler, "ldlm_cbd"); - if (!ldlm->ldlm_cb_service) + if (!ldlm->ldlm_cb_service) { + CERROR("failed to start service\n"); GOTO(out_proc, rc = -ENOMEM); + } ldlm->ldlm_cancel_service = ptlrpc_init_svc(LDLM_NEVENTS, LDLM_NBUFS, LDLM_BUFSIZE, @@ -615,8 +617,10 @@ static int ldlm_setup(struct obd_device *obddev, obd_count len, void *buf) LDLM_CANCEL_REPLY_PORTAL, "self", ldlm_cancel_handler, "ldlm_canceld"); - if (!ldlm->ldlm_cancel_service) + if (!ldlm->ldlm_cancel_service) { + CERROR("failed to start service\n"); GOTO(out_proc, rc = -ENOMEM); + } for (i = 0; i < LDLM_NUM_THREADS; i++) { char name[32]; diff --git a/lustre/llite/super.c b/lustre/llite/super.c index 027ee50..a348883 100644 --- a/lustre/llite/super.c +++ b/lustre/llite/super.c @@ -298,8 +298,7 @@ static void ll_clear_inode(struct inode *inode) } if (lli->lli_smd) { - rc = obd_cancel_unused(&sbi->ll_osc_conn, lli->lli_smd, - LDLM_FL_NO_CALLBACK); + rc = obd_cancel_unused(&sbi->ll_osc_conn, lli->lli_smd, 0); if (rc < 0) { CERROR("obd_cancel_unused: %d\n", rc); /* XXX FIXME do something dramatic */ diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index 132fdd4..7d41e3b 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -1157,10 +1157,12 @@ static int lov_enqueue(struct lustre_handle *conn, struct lov_stripe_md *lsm, parent_lock, type, &sub_ext, sizeof(sub_ext), mode, flags, cb, data, datalen, &(lockhs[i])); // XXX add a lock debug statement here - if (rc) + if (rc) { CERROR("Error enqueue objid "LPX64" subobj "LPX64 " on OST idx %d: rc = %d\n", lsm->lsm_object_id, loi->loi_id, loi->loi_ost_idx, rc); + memset(&(lockhs[i]), 0, sizeof(lockhs[i])); + } } RETURN(rc); } -- 1.8.3.1