Whamcloud - gitweb
b=5176
authorphil <phil>
Tue, 16 Nov 2004 21:55:58 +0000 (21:55 +0000)
committerphil <phil>
Tue, 16 Nov 2004 21:55:58 +0000 (21:55 +0000)
r=adilger

Try to stop threads before we assert in unregister_service

lustre/ChangeLog
lustre/ldlm/ldlm_lockd.c
lustre/mds/handler.c
lustre/mgmt/mgmt_svc.c
lustre/ost/ost_handler.c
lustre/ptlbd/server.c
lustre/ptlrpc/service.c

index ba6959e..2bd1182 100644 (file)
@@ -1,10 +1,11 @@
 tbd         Cluster File Systems, Inc. <info@clusterfs.com>
        * 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
index 8f5e587..4074048 100644 (file)
@@ -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();
 
index 45782bc..807773d 100644 (file)
@@ -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);
index 0d92b2f..fdeee93 100644 (file)
@@ -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;
index 8e4d802..badf82d 100644 (file)
@@ -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);
index b198284..0f06912 100644 (file)
@@ -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);
index c760cf9..8abf7dc 100644 (file)
@@ -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);