Whamcloud - gitweb
LU-6905 osp: rename ost_server(conn)_uuid 25/15725/4
authorwang di <di.wang@intel.com>
Fri, 24 Jul 2015 11:26:58 +0000 (04:26 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 14 Aug 2015 00:06:26 +0000 (00:06 +0000)
For OSP to MDT, rename ost_server(conn)_uuid(under /proc)
to mdt_server(conn)_uuid.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Iae794b3fd9fd9c21e5b6f04f406ab5e504aab1eb
Reviewed-on: http://review.whamcloud.com/15725
Tested-by: Jenkins
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osp/lproc_osp.c

index 4d499e2..530b34e 100644 (file)
@@ -776,6 +776,43 @@ static struct lprocfs_vars lprocfs_osp_obd_vars[] = {
        { NULL }
 };
 
+static struct lprocfs_vars lprocfs_osp_md_vars[] = {
+       { .name =       "uuid",
+         .fops =       &osp_uuid_fops                  },
+       { .name =       "ping",
+         .fops =       &osp_ping_fops,
+         .proc_mode =  0222                            },
+       { .name =       "connect_flags",
+         .fops =       &osp_connect_flags_fops         },
+       { .name =       "mdt_server_uuid",
+         .fops =       &osp_server_uuid_fops           },
+       { .name =       "mdt_conn_uuid",
+         .fops =       &osp_conn_uuid_fops             },
+       { .name =       "active",
+         .fops =       &osp_active_fops                },
+       { .name =       "max_rpcs_in_flight",
+         .fops =       &osp_max_rpcs_in_flight_fops    },
+       { .name =       "max_rpcs_in_progress",
+         .fops =       &osp_max_rpcs_in_prog_fops      },
+       { .name =       "timeouts",
+         .fops =       &osp_timeouts_fops              },
+       { .name =       "import",
+         .fops =       &osp_import_fops                },
+       { .name =       "state",
+         .fops =       &osp_state_fops                 },
+       { .name =       "maxage",
+         .fops =       &osp_maxage_fops                },
+       { .name =       "prealloc_status",
+         .fops =       &osp_pre_status_fops            },
+
+       /* for compatibility reasons */
+       { .name =       "destroys_in_flight",
+         .fops =       &osp_destroys_in_flight_fops            },
+       { .name =       "lfsck_max_rpcs_in_flight",
+         .fops =       &osp_lfsck_max_rpcs_in_flight_fops      },
+       { NULL }
+};
+
 LPROC_SEQ_FOPS_RO_TYPE(osp, dt_blksize);
 LPROC_SEQ_FOPS_RO_TYPE(osp, dt_kbytestotal);
 LPROC_SEQ_FOPS_RO_TYPE(osp, dt_kbytesfree);
@@ -811,7 +848,10 @@ void osp_lprocfs_init(struct osp_device *osp)
        struct obd_type         *type;
        int                      rc;
 
-       obd->obd_vars = lprocfs_osp_obd_vars;
+       if (osp->opd_connect_mdt)
+               obd->obd_vars = lprocfs_osp_md_vars;
+       else
+               obd->obd_vars = lprocfs_osp_obd_vars;
        if (lprocfs_obd_setup(obd) != 0)
                return;