Whamcloud - gitweb
Branch HEAD
authorliuy <liuy>
Fri, 28 Aug 2009 00:56:25 +0000 (00:56 +0000)
committerliuy <liuy>
Fri, 28 Aug 2009 00:56:25 +0000 (00:56 +0000)
b=19525
i=adilger
i=nathan.rutman

export MGS RPC stats in /proc

lustre/mgs/mgs_handler.c

index cb0ff23..bac0bff 100644 (file)
@@ -245,6 +245,11 @@ static int mgs_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
         mgs_init_fsdb_list(obd);
         sema_init(&mgs->mgs_sem, 1);
 
+        /* Setup proc */
+        lprocfs_mgs_init_vars(&lvars);
+        if (lprocfs_obd_setup(obd, lvars.obd_vars) == 0)
+                lproc_mgs_setup(obd);
+
         /* Start the service threads */
         mgs->mgs_service =
                 ptlrpc_init_svc(MGS_NBUFS, MGS_BUFSIZE, MGS_MAXREQSIZE,
@@ -264,12 +269,6 @@ static int mgs_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
         if (rc)
                 GOTO(err_thread, rc);
 
-        /* Setup proc */
-        lprocfs_mgs_init_vars(&lvars);
-        if (lprocfs_obd_setup(obd, lvars.obd_vars) == 0) {
-                lproc_mgs_setup(obd);
-        }
-
         ping_evictor_start();
 
         LCONSOLE_INFO("MGS %s started\n", obd->obd_name);
@@ -279,6 +278,7 @@ static int mgs_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
 err_thread:
         ptlrpc_unregister_service(mgs->mgs_service);
 err_llog:
+        lproc_mgs_cleanup(obd);
         obd_llog_finish(obd, 0);
 err_fs:
         /* No extra cleanup needed for llog_init_commit_thread() */