From 587499bcaa450de9dfe1024b3a7016afc050968a Mon Sep 17 00:00:00 2001 From: phil Date: Tue, 16 Nov 2004 21:55:58 +0000 Subject: [PATCH] b=5176 r=adilger Try to stop threads before we assert in unregister_service --- lustre/ChangeLog | 3 ++- lustre/ldlm/ldlm_lockd.c | 2 -- lustre/mds/handler.c | 5 ----- lustre/mgmt/mgmt_svc.c | 1 - lustre/ost/ost_handler.c | 3 --- lustre/ptlbd/server.c | 1 - lustre/ptlrpc/service.c | 1 + 7 files changed, 3 insertions(+), 13 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index ba6959e..2bd1182 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -1,10 +1,11 @@ tbd Cluster File Systems, Inc. * version 1.3.4 * bug fixes - - flock/lockf fixes (bug it's still disabled, pending + - flock/lockf fixes (but it's still disabled, pending 5135) - don't use EXT3 constants in llite code (5094) - return async write errors to application if possible (2248) - return last_committed value from OST to avoid OOM (4966) + - memory shortage at startup could cause assertion (5176) * miscellania - reorganization of lov code - single portals codebase diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index 8f5e587..4074048 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -1424,9 +1424,7 @@ static int ldlm_cleanup(int force) } OBD_FREE(blp, sizeof(*blp)); - ptlrpc_stop_all_threads(ldlm_state->ldlm_cb_service); ptlrpc_unregister_service(ldlm_state->ldlm_cb_service); - ptlrpc_stop_all_threads(ldlm_state->ldlm_cancel_service); ptlrpc_unregister_service(ldlm_state->ldlm_cancel_service); ldlm_proc_cleanup(); diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 45782bc..807773d 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -1967,13 +1967,8 @@ static int mdt_cleanup(struct obd_device *obd, int flags) struct mds_obd *mds = &obd->u.mds; ENTRY; - ptlrpc_stop_all_threads(mds->mds_readpage_service); ptlrpc_unregister_service(mds->mds_readpage_service); - - ptlrpc_stop_all_threads(mds->mds_setattr_service); ptlrpc_unregister_service(mds->mds_setattr_service); - - ptlrpc_stop_all_threads(mds->mds_service); ptlrpc_unregister_service(mds->mds_service); lprocfs_obd_cleanup(obd); diff --git a/lustre/mgmt/mgmt_svc.c b/lustre/mgmt/mgmt_svc.c index 0d92b2f..fdeee93 100644 --- a/lustre/mgmt/mgmt_svc.c +++ b/lustre/mgmt/mgmt_svc.c @@ -116,7 +116,6 @@ static int mgmt_cleanup(struct obd_device *obd, int flags) if (!mgmt_initialized) RETURN(-ENOENT); - ptlrpc_stop_all_threads(mgmt_service); ptlrpc_unregister_service(mgmt_service); mgmt_initialized = 0; diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index 8e4d802..badf82d 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -1186,10 +1186,7 @@ static int ost_cleanup(struct obd_device *obd, int flags) } spin_unlock_bh(&obd->obd_processing_task_lock); - ptlrpc_stop_all_threads(ost->ost_service); ptlrpc_unregister_service(ost->ost_service); - - ptlrpc_stop_all_threads(ost->ost_create_service); ptlrpc_unregister_service(ost->ost_create_service); lprocfs_obd_cleanup(obd); diff --git a/lustre/ptlbd/server.c b/lustre/ptlbd/server.c index b198284..0f06912 100644 --- a/lustre/ptlbd/server.c +++ b/lustre/ptlbd/server.c @@ -85,7 +85,6 @@ static int ptlbd_sv_cleanup(struct obd_device *obd, int flags) /* XXX check for state */ - ptlrpc_stop_all_threads(ptlbd->ptlbd_service); ptlrpc_unregister_service(ptlbd->ptlbd_service); if ( ! IS_ERR(ptlbd->filp) ) filp_close(ptlbd->filp, NULL); diff --git a/lustre/ptlrpc/service.c b/lustre/ptlrpc/service.c index c760cf9..8abf7dc 100644 --- a/lustre/ptlrpc/service.c +++ b/lustre/ptlrpc/service.c @@ -909,6 +909,7 @@ int ptlrpc_unregister_service(struct ptlrpc_service *service) struct l_wait_info lwi; struct list_head *tmp; + ptlrpc_stop_all_threads(service); LASSERT(list_empty(&service->srv_threads)); spin_lock (&ptlrpc_all_services_lock); -- 1.8.3.1