Whamcloud - gitweb
Branch b1_4
authoradilger <adilger>
Mon, 15 Aug 2005 20:05:24 +0000 (20:05 +0000)
committeradilger <adilger>
Mon, 15 Aug 2005 20:05:24 +0000 (20:05 +0000)
Description: service threads change working directory to that of init
Details    : Starting lustre service threads may pin the working directory
             of the parent thread, making that filesystem busy.  Threads
             now change to the working directory of init to avoid this.
b=6273

lustre/ChangeLog
lustre/ptlrpc/service.c

index 0aa1de7..f32372a 100644 (file)
@@ -66,6 +66,13 @@ Description: Do not query file size twice, somewhat slowing stat(2) calls.
 Details    : lookup_it_finish() used to query file size from OSTs that was not
              needed.
 
+Severity   : minor
+Bugzilla   : 6237
+Description: service threads change working directory to that of init
+Details    : Starting lustre service threads may pin the working directory
+             of the parent thread, making that filesystem busy.  Threads
+             now change to the working directory of init to avoid this.
+
 2005-08-08  Cluster File Systems, Inc. <info@clusterfs.com>
        * version 1.4.4
        * bug fixes
index 698277d..979e9d5 100644 (file)
@@ -397,7 +397,7 @@ ptlrpc_server_free_request(struct ptlrpc_request *req)
         spin_lock_irqsave(&svc->srv_lock, flags);
 
         svc->srv_n_active_reqs--;
-        list_add (&req->rq_list, &rqbd->rqbd_reqs);
+        list_add(&req->rq_list, &rqbd->rqbd_reqs);
 
         refcount = --(rqbd->rqbd_refcount);
         if (refcount == 0) {
@@ -533,8 +533,8 @@ ptlrpc_server_handle_request(struct ptlrpc_service *svc,
                                   request->rq_export->exp_conn_cnt);
                         goto put_conn;
                 }
-                if (request->rq_export->exp_obd
-                    && request->rq_export->exp_obd->obd_fail) {
+                if (request->rq_export->exp_obd &&
+                    request->rq_export->exp_obd->obd_fail) {
                         /* Failing over, don't handle any more reqs, send
                            error response instead. */
                         CDEBUG(D_HA, "Dropping req %p for failed obd %s\n",
@@ -761,6 +761,7 @@ void ptlrpc_daemonize(void)
 {
         exit_mm(current);
         lustre_daemonize_helper();
+        set_fs_pwd(current->fs, init_task.fs->pwdmnt, init_task.fs->pwd);
         exit_files(current);
         reparent_to_init();
 }