Whamcloud - gitweb
Quiet down the lprocfs warnings a bit until Hari gets new code into the tree.
authoradilger <adilger>
Thu, 31 Oct 2002 07:12:36 +0000 (07:12 +0000)
committeradilger <adilger>
Thu, 31 Oct 2002 07:12:36 +0000 (07:12 +0000)
lustre/include/linux/lprocfs.h
lustre/obdclass/class_obd.c
lustre/obdclass/lprocfs.c

index 2920a59..d2aad17 100644 (file)
@@ -286,6 +286,13 @@ enum {
 };
 
 enum {
+        LPROCFS_NAMESPACE_ENUM(mdt, mgmt_setup),
+        LPROCFS_NAMESPACE_ENUM(mdt, mgmt_cleanup),
+        LPROCFS_NAMESPACE_ENUM(mdt, mgmt_connect),
+        LPROCFS_NAMESPACE_ENUM(mdt, mgmt_disconnect),
+};
+
+enum {
         LPROCFS_NAMESPACE_ENUM(osc, mgmt_setup),
         LPROCFS_NAMESPACE_ENUM(osc, mgmt_cleanup),
         LPROCFS_NAMESPACE_ENUM(osc, mgmt_connect),
@@ -479,6 +486,7 @@ enum {
 enum {
         LPROCFS_ENUM(mdc),
         LPROCFS_ENUM(mds),
+        LPROCFS_ENUM(mdt),
         LPROCFS_ENUM(osc),
         LPROCFS_ENUM(ost),
         LPROCFS_ENUM(lov),
index 9e3d458..2a22c8f 100644 (file)
@@ -211,6 +211,15 @@ lprocfs_group_t lprocfs_mds_nm[]={
          {0, 0, 0}
 };
 
+lprocfs_group_t lprocfs_mdt_nm[]={
+         {obd_dir_nm_1, obd_var_nm_1, e_generic},
+         /* {mds_dir_nm_1, obd_var_nm_1, e_generic}, */
+         /* {mds_dir_nm_2, mds_var_nm_2, e_specific}, */
+         {snmp_dir_nm, snmp_var_nm, e_specific},
+         {mds_snmp_dir_nm_1, mds_snmp_var_nm_1, e_specific},
+         {0, 0, 0}
+};
+
 /*
  * OSC Namespace
  */
@@ -413,6 +422,7 @@ lprocfs_group_t lprocfs_ptlrpc_nm[]={
 lprocfs_obd_nm_t obd_nm[]={
         {"mdc", lprocfs_mdc_nm, sizeof(struct lprofiler_gen)},
         {"mds", lprocfs_mds_nm, sizeof(struct lprofiler_gen)},
+        {"mdt", lprocfs_mdt_nm, sizeof(struct lprofiler_gen)},
         {"osc", lprocfs_osc_nm, sizeof(struct lprofiler_gen)},
         {"ost", lprocfs_ost_nm, sizeof(struct lprofiler_gen)},
         {"lov", lprocfs_lov_nm, sizeof(struct lprofiler_gen)},
index a683dac..55a18e8 100644 (file)
@@ -136,6 +136,13 @@ struct namespace_index dir_mds_index[] = {
         LPROCFS_DIR_INDEX(mds, reint_recreate),
 };
 
+struct namespace_index dir_mdt_index[] = {
+        LPROCFS_DIR_INDEX(mdt, mgmt_setup),
+        LPROCFS_DIR_INDEX(mdt, mgmt_cleanup),
+        LPROCFS_DIR_INDEX(mdt, mgmt_connect),
+        LPROCFS_DIR_INDEX(mdt, mgmt_disconnect),
+};
+
 struct namespace_index dir_osc_index[] = {
         LPROCFS_DIR_INDEX(osc, mgmt_setup),
         LPROCFS_DIR_INDEX(osc, mgmt_cleanup),
@@ -240,6 +247,13 @@ struct namespace_index prof_mds_index[]= {
         LPROCFS_CNTR_INDEX(mds, num_ops),
 };
 
+struct namespace_index prof_mdt_index[]= {
+        LPROCFS_CNTR_INDEX(mds, min_time),
+        LPROCFS_CNTR_INDEX(mds, max_time),
+        LPROCFS_CNTR_INDEX(mds, sum_time),
+        LPROCFS_CNTR_INDEX(mds, num_ops),
+};
+
 struct namespace_index prof_osc_index[]= {
         LPROCFS_CNTR_INDEX(osc, min_time),
         LPROCFS_CNTR_INDEX(osc, max_time),
@@ -304,6 +318,7 @@ struct namespace_index prof_ptlrpc_index[] = {
 struct groupspace_index class_index[] = {
         LPROCFS_GROUP_CREATE(mdc),
         LPROCFS_GROUP_CREATE(mds),
+        LPROCFS_GROUP_CREATE(mdt),
         LPROCFS_GROUP_CREATE(osc),
         LPROCFS_GROUP_CREATE(ost),
         LPROCFS_GROUP_CREATE(lov),
@@ -338,13 +353,13 @@ int lprocfs_reg_dev(struct obd_device* device, lprocfs_group_t* namespace,
                 return LPROCFS_FAILURE;
         }
 
-
         /* Obtain the class-array index */
         class_array_index = lprocfs_getclass_idx(class_index,
                                                  device->obd_type->typ_name);
 
         if (class_array_index == LPROCFS_FAILURE) {
-                CERROR("!! Could not find class !! \n");
+                CERROR("Could not find class for %s\n",
+                       device->obd_type->typ_name);
                 return LPROCFS_FAILURE;
         }
 
@@ -789,8 +804,7 @@ int lprocfs_dereg_dev(struct obd_device* device)
 {
         struct proc_dir_entry* temp;
 
-        CDEBUG(D_OTHER, "LPROCFS removing device = %s\n", \
-               device->obd_name);
+        CDEBUG(D_OTHER, "LPROCFS removing device = %s\n", device->obd_name);
 
         if (!device) {
                 CDEBUG(D_OTHER, "! LProcfs:  Null pointer !\n");
@@ -802,10 +816,9 @@ int lprocfs_dereg_dev(struct obd_device* device)
                 return LPROCFS_FAILURE;
         }
 
-        temp = lprocfs_bfs_srch(proc_lustre_dev_root->subdir, \
-                                device->obd_name);
+        temp = lprocfs_bfs_srch(proc_lustre_dev_root->subdir, device->obd_name);
         if (temp == 0) {
-                CERROR("!! No root obtained, device does not exist !!\n");
+                CERROR("Device %s not in lprocfs\n", device->obd_name);
                 return LPROCFS_FAILURE;
         }