Whamcloud - gitweb
LU-2272 statahead: ll_intent_drop_lock() called in spinlock
[fs/lustre-release.git] / lustre / mdt / mdt_mds.c
index d91d1d4..cb28d88 100644 (file)
@@ -138,7 +138,7 @@ static int mds_start_ptlrpc_service(struct mds_device *m)
 {
        static struct ptlrpc_service_conf conf;
        struct obd_device *obd = m->mds_md_dev.md_lu_dev.ld_obd;
-       cfs_proc_dir_entry_t *procfs_entry;
+       struct proc_dir_entry *procfs_entry;
        int rc = 0;
        ENTRY;
 
@@ -288,7 +288,7 @@ static int mds_start_ptlrpc_service(struct mds_device *m)
                        .bc_req_max_size        = OUT_MAXREQSIZE,
                        .bc_rep_max_size        = OUT_MAXREPSIZE,
                        .bc_req_portal          = OUT_PORTAL,
-                       .bc_rep_portal          = MDC_REPLY_PORTAL,
+                       .bc_rep_portal          = OSC_REPLY_PORTAL,
                },
                /*
                 * We'd like to have a mechanism to set this on a per-device
@@ -302,7 +302,8 @@ static int mds_start_ptlrpc_service(struct mds_device *m)
                        .tc_nthrs_max           = MDS_NTHRS_MAX,
                        .tc_nthrs_user          = mds_num_threads,
                        .tc_cpu_affinity        = 1,
-                       .tc_ctx_tags            = LCT_MD_THREAD,
+                       .tc_ctx_tags            = LCT_MD_THREAD |
+                                                 LCT_DT_THREAD,
                },
                .psc_cpt                = {
                        .cc_pattern             = mds_num_cpts,
@@ -463,6 +464,13 @@ static struct lu_device *mds_device_free(const struct lu_env *env,
        RETURN(NULL);
 }
 
+LPROC_SEQ_FOPS_RO_TYPE(mds, uuid);
+
+static struct lprocfs_seq_vars lprocfs_mds_obd_vars[] = {
+       { "uuid",       &mds_uuid_fops  },
+       { 0 }
+};
+
 static struct lu_device *mds_device_alloc(const struct lu_env *env,
                                          struct lu_device_type *t,
                                          struct lustre_cfg *cfg)
@@ -486,7 +494,8 @@ static struct lu_device *mds_device_alloc(const struct lu_env *env,
        /* set this lu_device to obd, because error handling need it */
        obd->obd_lu_dev = l;
 
-       rc = lprocfs_obd_setup(obd, lprocfs_mds_obd_vars);
+       obd->obd_vars = lprocfs_mds_obd_vars;
+       rc = lprocfs_obd_setup(obd);
        if (rc != 0) {
                mds_device_free(env, l);
                l = ERR_PTR(rc);
@@ -531,8 +540,6 @@ static struct obd_ops mds_obd_device_ops = {
 
 int mds_mod_init(void)
 {
-       int rc;
-
        if (mdt_num_threads != 0 && mds_num_threads == 0) {
                LCONSOLE_INFO("mdt_num_threads module parameter is deprecated, "
                              "use mds_num_threads instead or unset both for "
@@ -540,10 +547,8 @@ int mds_mod_init(void)
                mds_num_threads = mdt_num_threads;
        }
 
-       rc = class_register_type(&mds_obd_device_ops, NULL,
-                                lprocfs_mds_module_vars, LUSTRE_MDS_NAME,
-                                &mds_device_type);
-       return rc;
+       return class_register_type(&mds_obd_device_ops, NULL, true, NULL,
+                                  LUSTRE_MDS_NAME, &mds_device_type);
 }
 
 void mds_mod_exit(void)