Whamcloud - gitweb
rename prototype obd name to their official name: mdt0->mdt, cmm0->cmm, mdd0->mdd...
authorhuanghua <huanghua>
Tue, 5 Sep 2006 16:18:10 +0000 (16:18 +0000)
committerhuanghua <huanghua>
Tue, 5 Sep 2006 16:18:10 +0000 (16:18 +0000)
14 files changed:
lustre/cmm/cmm_device.c
lustre/cmm/cmm_object.c
lustre/cmm/mdc_device.c
lustre/cmm/mdc_object.c
lustre/fld/fld_handler.c
lustre/include/obd.h
lustre/mdd/mdd_handler.c
lustre/mds/handler.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_internal.h
lustre/mgs/mgs_llog.c
lustre/obdclass/genops.c
lustre/obdclass/obd_config.c
lustre/osd/osd_handler.c

index 2f27008..eb6875c 100644 (file)
@@ -223,6 +223,7 @@ static int cmm_process_config(const struct lu_context *ctx,
         struct cmm_device *m = lu2cmm_dev(d);
         struct lu_device *next = md2lu_dev(m->cmm_child);
         int err;
+        ENTRY;
 
         switch(cfg->lcfg_command) {
         case LCFG_ADD_MDC:
@@ -362,9 +363,9 @@ static struct lu_device_type_operations cmm_device_type_ops = {
 
 static struct lu_device_type cmm_device_type = {
         .ldt_tags     = LU_DEVICE_MD,
-        .ldt_name     = LUSTRE_CMM0_NAME,
+        .ldt_name     = LUSTRE_CMM_NAME,
         .ldt_ops      = &cmm_device_type_ops,
-        .ldt_ctx_tags = LCT_MD_THREAD
+        .ldt_ctx_tags = LCT_MD_THREAD | LCT_DT_THREAD
 };
 
 struct lprocfs_vars lprocfs_cmm_obd_vars[] = {
@@ -385,16 +386,16 @@ static int __init cmm_mod_init(void)
 
         lprocfs_init_vars(cmm, &lvars);
         return class_register_type(&cmm_obd_device_ops, NULL, lvars.module_vars,
-                                   LUSTRE_CMM0_NAME, &cmm_device_type);
+                                   LUSTRE_CMM_NAME, &cmm_device_type);
 }
 
 static void __exit cmm_mod_exit(void)
 {
-        class_unregister_type(LUSTRE_CMM0_NAME);
+        class_unregister_type(LUSTRE_CMM_NAME);
 }
 
 MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre Clustered Metadata Manager ("LUSTRE_CMM0_NAME")");
+MODULE_DESCRIPTION("Lustre Clustered Metadata Manager ("LUSTRE_CMM_NAME")");
 MODULE_LICENSE("GPL");
 
 cfs_module(cmm, "0.1.0", cmm_mod_init, cmm_mod_exit);
index 564055c..0dabdbd 100644 (file)
@@ -193,7 +193,7 @@ static int cml_object_init(const struct lu_context *ctx, struct lu_object *lo)
 static int cml_object_print(const struct lu_context *ctx, void *cookie,
                             lu_printer_t p, const struct lu_object *lo)
 {
-       return (*p)(ctx, cookie, LUSTRE_CMM0_NAME"-local@%p", lo);
+       return (*p)(ctx, cookie, LUSTRE_CMM_NAME"-local@%p", lo);
 }
 
 static struct lu_object_operations cml_obj_ops = {
@@ -534,7 +534,7 @@ static int cmr_object_init(const struct lu_context *ctx, struct lu_object *lo)
 static int cmr_object_print(const struct lu_context *ctx, void *cookie,
                             lu_printer_t p, const struct lu_object *lo)
 {
-       return (*p)(ctx, cookie, LUSTRE_CMM0_NAME"-remote@%p", lo);
+       return (*p)(ctx, cookie, LUSTRE_CMM_NAME"-remote@%p", lo);
 }
 
 static struct lu_object_operations cmr_obj_ops = {
index 65f47db..a476cc2 100644 (file)
@@ -282,7 +282,7 @@ static struct lu_device_type_operations mdc_device_type_ops = {
 
 struct lu_device_type mdc_device_type = {
         .ldt_tags     = LU_DEVICE_MD,
-        .ldt_name     = LUSTRE_MDC0_NAME,
+        .ldt_name     = LUSTRE_CMM_MDC_NAME,
         .ldt_ops      = &mdc_device_type_ops,
         .ldt_ctx_tags = LCT_MD_THREAD|LCT_CL_THREAD
 };
index 9cd70a2..bc7b991 100644 (file)
@@ -81,7 +81,7 @@ static int mdc_object_init(const struct lu_context *ctx, struct lu_object *lo)
 static int mdc_object_print(const struct lu_context *ctx, void *cookie,
                             lu_printer_t p, const struct lu_object *lo)
 {
-       return (*p)(ctx, cookie, LUSTRE_MDC0_NAME"-object@%p", lo);
+       return (*p)(ctx, cookie, LUSTRE_CMM_MDC_NAME"-object@%p", lo);
 }
 
 static struct lu_object_operations mdc_obj_ops = {
index 00006ce..6c5f99f 100644 (file)
@@ -81,6 +81,7 @@ struct lu_context_key fld_thread_key = {
 
 static int __init fld_mod_init(void)
 {
+        printk(KERN_INFO "Lustre: Fid Location Database; info@clusterfs.com\n");
         lu_context_key_register(&fld_thread_key);
         return 0;
 }
index 20feb62..d89889c 100644 (file)
@@ -647,11 +647,10 @@ struct lu_placement_hint {
 #define LUSTRE_MDT_NAME  "mdt"
 
 /* new MDS layers. Prototype */
-#define LUSTRE_MDT0_NAME "mdt0"
-#define LUSTRE_CMM0_NAME "cmm0"
-#define LUSTRE_MDD0_NAME "mdd0"
-#define LUSTRE_OSD0_NAME "osd0"
-#define LUSTRE_MDC0_NAME "mdc0"
+#define LUSTRE_CMM_NAME  "cmm"
+#define LUSTRE_MDD_NAME  "mdd"
+#define LUSTRE_OSD_NAME  "osd"
+#define LUSTRE_CMM_MDC_NAME "cmm-mdc"
 
 #define LUSTRE_MDC_NAME  "mdc"
 #define LUSTRE_LOV_NAME  "lov"
index da25f86..cc566ce 100644 (file)
@@ -461,7 +461,7 @@ static void mdd_txn_param_build(const struct lu_context *ctx,
 static int mdd_object_print(const struct lu_context *ctxt, void *cookie,
                             lu_printer_t p, const struct lu_object *o)
 {
-        return (*p)(ctxt, cookie, LUSTRE_MDD0_NAME"-object@%p", o);
+        return (*p)(ctxt, cookie, LUSTRE_MDD_NAME"-object@%p", o);
 }
 
 static int mdd_mount(const struct lu_context *ctx, struct mdd_device *mdd)
@@ -2192,9 +2192,9 @@ static struct lu_device_type_operations mdd_device_type_ops = {
 
 static struct lu_device_type mdd_device_type = {
         .ldt_tags     = LU_DEVICE_MD,
-        .ldt_name     = LUSTRE_MDD0_NAME,
+        .ldt_name     = LUSTRE_MDD_NAME,
         .ldt_ops      = &mdd_device_type_ops,
-        .ldt_ctx_tags = LCT_MD_THREAD
+        .ldt_ctx_tags = LCT_MD_THREAD | LCT_DT_THREAD
 };
 
 static void *mdd_key_init(const struct lu_context *ctx,
@@ -2234,19 +2234,19 @@ LPROCFS_INIT_VARS(mdd, lprocfs_mdd_module_vars, lprocfs_mdd_obd_vars);
 static int __init mdd_mod_init(void)
 {
         struct lprocfs_static_vars lvars;
-
+        printk(KERN_INFO "Lustre: MetaData Device; info@clusterfs.com\n");
         lprocfs_init_vars(mdd, &lvars);
         return class_register_type(&mdd_obd_device_ops, NULL, lvars.module_vars,
-                                   LUSTRE_MDD0_NAME, &mdd_device_type);
+                                   LUSTRE_MDD_NAME, &mdd_device_type);
 }
 
 static void __exit mdd_mod_exit(void)
 {
-        class_unregister_type(LUSTRE_MDD0_NAME);
+        class_unregister_type(LUSTRE_MDD_NAME);
 }
 
 MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre Meta-data Device Prototype ("LUSTRE_MDD0_NAME")");
+MODULE_DESCRIPTION("Lustre Meta-data Device Prototype ("LUSTRE_MDD_NAME")");
 MODULE_LICENSE("GPL");
 
 cfs_module(mdd, "0.1.0", mdd_mod_init, mdd_mod_exit);
index 57faa56..43dc952 100644 (file)
@@ -2719,8 +2719,9 @@ static __attribute__((unused)) int __init mds_init(void)
         class_register_type(&mds_obd_ops, NULL,
                             lvars.module_vars, LUSTRE_MDS_NAME, NULL);
         lprocfs_init_vars(mdt, &lvars);
-        class_register_type(&mdt_obd_ops, NULL,
-                            lvars.module_vars, LUSTRE_MDT_NAME, NULL);
+        mdt_obd_ops = mdt_obd_ops; //make compiler happy
+//        class_register_type(&mdt_obd_ops, NULL,
+//                            lvars.module_vars, LUSTRE_MDT_NAME, NULL);
 
         return 0;
 }
@@ -2732,7 +2733,7 @@ static __attribute__((unused)) void /*__exit*/ mds_exit(void)
                 PORTAL_SYMBOL_PUT(mds_quota_interface);
 
         class_unregister_type(LUSTRE_MDS_NAME);
-        class_unregister_type(LUSTRE_MDT_NAME);
+//        class_unregister_type(LUSTRE_MDT_NAME);
 }
 /*mds still need lov setup here*/
 static int mds_cmd_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
index 18094b4..b37d799 100644 (file)
@@ -1528,7 +1528,7 @@ static int mdt_handle0(struct ptlrpc_request *req,
                         rc = mdt_reply(req, rc, info);
                 }
         } else
-                CERROR(LUSTRE_MDT0_NAME" drops mal-formed request\n");
+                CERROR(LUSTRE_MDT_NAME" drops mal-formed request\n");
         RETURN(rc);
 }
 
@@ -2160,7 +2160,7 @@ static int mdt_start_ptlrpc_service(struct mdt_device *m)
                  */
                 .psc_num_threads   = min(max(mdt_num_threads, MDT_MIN_THREADS),
                                        MDT_MAX_THREADS),
-                .psc_ctx_tags      = LCT_MD_THREAD
+                .psc_ctx_tags      = LCT_MD_THREAD | LCT_DT_THREAD
         };
 
         m->mdt_ldlm_client = &m->mdt_md_dev.md_lu_dev.ld_obd->obd_ldlm_client;
@@ -2168,13 +2168,13 @@ static int mdt_start_ptlrpc_service(struct mdt_device *m)
                            "mdt_ldlm_client", m->mdt_ldlm_client);
 
         m->mdt_service =
-                ptlrpc_init_svc_conf(&conf, mdt_regular_handle, LUSTRE_MDT0_NAME,
+                ptlrpc_init_svc_conf(&conf, mdt_regular_handle, LUSTRE_MDT_NAME,
                                      m->mdt_md_dev.md_lu_dev.ld_proc_entry,
                                      NULL);
         if (m->mdt_service == NULL)
                 RETURN(-ENOMEM);
 
-        rc = ptlrpc_start_threads(NULL, m->mdt_service, LUSTRE_MDT0_NAME);
+        rc = ptlrpc_start_threads(NULL, m->mdt_service, LUSTRE_MDT_NAME);
         if (rc)
                 GOTO(err_mdt_svc, rc);
 
@@ -2192,11 +2192,11 @@ static int mdt_start_ptlrpc_service(struct mdt_device *m)
                 .psc_watchdog_timeout = MDT_SERVICE_WATCHDOG_TIMEOUT,
                 .psc_num_threads   = min(max(mdt_num_threads, MDT_MIN_THREADS),
                                        MDT_MAX_THREADS),
-                .psc_ctx_tags      = LCT_MD_THREAD
+                .psc_ctx_tags      = LCT_MD_THREAD | LCT_DT_THREAD
         };
         m->mdt_readpage_service =
                 ptlrpc_init_svc_conf(&conf, mdt_readpage_handle,
-                                     LUSTRE_MDT0_NAME "_readpage",
+                                     LUSTRE_MDT_NAME "_readpage",
                                      m->mdt_md_dev.md_lu_dev.ld_proc_entry,
                                      NULL);
 
@@ -2220,12 +2220,12 @@ static int mdt_start_ptlrpc_service(struct mdt_device *m)
                 .psc_watchdog_timeout = MDT_SERVICE_WATCHDOG_TIMEOUT,
                 .psc_num_threads   = min(max(mdt_num_threads, MDT_MIN_THREADS),
                                        MDT_MAX_THREADS),
-                .psc_ctx_tags      = LCT_MD_THREAD
+                .psc_ctx_tags      = LCT_MD_THREAD | LCT_DT_THREAD
         };
 
         m->mdt_setattr_service =
                 ptlrpc_init_svc_conf(&conf, mdt_regular_handle,
-                                     LUSTRE_MDT0_NAME "_setattr",
+                                     LUSTRE_MDT_NAME "_setattr",
                                      m->mdt_md_dev.md_lu_dev.ld_proc_entry,
                                      NULL);
 
@@ -2298,7 +2298,7 @@ static struct lu_device *mdt_layer_setup(const struct lu_context *ctx,
         struct lu_device      *d;
         int rc;
         ENTRY;
-
+        
         /* find the type */
         type = class_get_type(typename);
         if (!type) {
@@ -2337,6 +2337,7 @@ static struct lu_device *mdt_layer_setup(const struct lu_context *ctx,
         lu_device_get(d);
 
         RETURN(d);
+
 out_alloc:
         ldt->ldt_ops->ldto_device_free(ctx, d);
         type->typ_refcnt--;
@@ -2346,30 +2347,30 @@ out:
         return ERR_PTR(rc);
 }
 
-static int mdt_stack_init(const struct lu_context *ctx,
+static int mdt_stack_init(const struct lu_context *ctx, 
                           struct mdt_device *m, struct lustre_cfg *cfg)
 {
         struct lu_device  *d = &m->mdt_md_dev.md_lu_dev;
         struct lu_device  *tmp;
-        struct md_device *md;
+        struct md_device  *md;
         int rc;
         ENTRY;
 
         /* init the stack */
-        tmp = mdt_layer_setup(ctx, LUSTRE_OSD0_NAME, d, cfg);
+        tmp = mdt_layer_setup(ctx, LUSTRE_OSD_NAME, d, cfg);
         if (IS_ERR(tmp)) {
                 RETURN(PTR_ERR(tmp));
         }
         m->mdt_bottom = lu2dt_dev(tmp);
         d = tmp;
-        tmp = mdt_layer_setup(ctx, LUSTRE_MDD0_NAME, d, cfg);
+        tmp = mdt_layer_setup(ctx, LUSTRE_MDD_NAME, d, cfg);
         if (IS_ERR(tmp)) {
                 GOTO(out, rc = PTR_ERR(tmp));
         }
         d = tmp;
         md = lu2md_dev(d);
 
-        tmp = mdt_layer_setup(ctx, LUSTRE_CMM0_NAME, d, cfg);
+        tmp = mdt_layer_setup(ctx, LUSTRE_CMM_NAME, d, cfg);
         if (IS_ERR(tmp)) {
                 GOTO(out, rc = PTR_ERR(tmp));
         }
@@ -2431,7 +2432,7 @@ static void mdt_fini(const struct lu_context *ctx, struct mdt_device *m)
 }
 
 static int mdt_init0(const struct lu_context *ctx, struct mdt_device *m,
-                     struct lu_device_type *t, struct lustre_cfg *cfg)
+                     struct lu_device_type *ldt, struct lustre_cfg *cfg)
 {
         struct mdt_thread_info *info;
         struct obd_device      *obd;
@@ -2464,7 +2465,7 @@ static int mdt_init0(const struct lu_context *ctx, struct mdt_device *m,
         if (s == NULL)
                 RETURN(-ENOMEM);
 
-        md_device_init(&m->mdt_md_dev, t);
+        md_device_init(&m->mdt_md_dev, ldt);
         m->mdt_md_dev.md_lu_dev.ld_ops = &mdt_lu_ops;
         m->mdt_md_dev.md_lu_dev.ld_obd = obd;
 
@@ -2480,6 +2481,7 @@ static int mdt_init0(const struct lu_context *ctx, struct mdt_device *m,
                 CERROR("can't init device stack, rc %d\n", rc);
                 GOTO(err_fini_site, rc);
         }
+
         /* set server index */
         LASSERT(num);
         s->ls_node_id = simple_strtol(num, NULL, 10);
@@ -2493,7 +2495,7 @@ static int mdt_init0(const struct lu_context *ctx, struct mdt_device *m,
                 GOTO(err_fini_fld, rc);
 
         snprintf(info->mti_u.ns_name, sizeof info->mti_u.ns_name,
-                 LUSTRE_MDT0_NAME"-%p", m);
+                 LUSTRE_MDT_NAME"-%p", m);
         m->mdt_namespace = ldlm_namespace_new(info->mti_u.ns_name,
                                               LDLM_NAMESPACE_SERVER);
         if (m->mdt_namespace == NULL)
@@ -2623,7 +2625,7 @@ static void mdt_object_free(const struct lu_context *ctxt, struct lu_object *o)
 static int mdt_object_print(const struct lu_context *ctxt, void *cookie,
                             lu_printer_t p, const struct lu_object *o)
 {
-        return (*p)(ctxt, cookie, LUSTRE_MDT0_NAME"-object@%p", o);
+        return (*p)(ctxt, cookie, LUSTRE_MDT_NAME"-object@%p", o);
 }
 
 static struct lu_device_operations mdt_lu_ops = {
@@ -2783,7 +2785,7 @@ static int mdt_destroy_export(struct obd_export *export)
         if (obd_uuid_equals(&export->exp_client_uuid, &obd->obd_uuid))
                 RETURN(0);
 
-        rc = lu_context_init(&ctxt, LCT_MD_THREAD);
+        rc = lu_context_init(&ctxt, LCT_MD_THREAD | LCT_DT_THREAD);
         if (rc)
                 RETURN(rc);
 
@@ -2854,7 +2856,7 @@ static int mdt_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
 
         ENTRY;
         CDEBUG(D_IOCTL, "handling ioctl cmd %#x\n", cmd);
-        rc = lu_context_init(&ctxt, LCT_MD_THREAD);
+        rc = lu_context_init(&ctxt, LCT_MD_THREAD | LCT_DT_THREAD);
         if (rc)
                 RETURN(rc);
         lu_context_enter(&ctxt);
@@ -3011,9 +3013,9 @@ static struct lu_device_type_operations mdt_device_type_ops = {
 
 static struct lu_device_type mdt_device_type = {
         .ldt_tags     = LU_DEVICE_MD,
-        .ldt_name     = LUSTRE_MDT0_NAME,
+        .ldt_name     = LUSTRE_MDT_NAME,
         .ldt_ops      = &mdt_device_type_ops,
-        .ldt_ctx_tags = LCT_MD_THREAD
+        .ldt_ctx_tags = LCT_MD_THREAD | LCT_DT_THREAD
 };
 
 static struct lprocfs_vars lprocfs_mdt_obd_vars[] = {
@@ -3031,17 +3033,19 @@ static int __init mdt_mod_init(void)
         int rc;
         struct lprocfs_static_vars lvars;
 
+        printk(KERN_INFO "Lustre: MetaData Target; info@clusterfs.com\n");
+        
         mdt_num_threads = MDT_NUM_THREADS;
         lprocfs_init_vars(mdt, &lvars);
         rc = class_register_type(&mdt_obd_device_ops, NULL,
-                                 lvars.module_vars, LUSTRE_MDT0_NAME,
+                                 lvars.module_vars, LUSTRE_MDT_NAME,
                                  &mdt_device_type);
         return rc;
 }
 
 static void __exit mdt_mod_exit(void)
 {
-        class_unregister_type(LUSTRE_MDT0_NAME);
+        class_unregister_type(LUSTRE_MDT_NAME);
 }
 
 
@@ -3164,7 +3168,7 @@ static struct mdt_opc_slice mdt_readpage_handlers[] = {
 };
 
 MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre Meta-data Target ("LUSTRE_MDT0_NAME")");
+MODULE_DESCRIPTION("Lustre Meta-data Target ("LUSTRE_MDT_NAME")");
 MODULE_LICENSE("GPL");
 
 CFS_MODULE_PARM(mdt_num_threads, "ul", ulong, 0444,
index b046f75..1e3f0dd 100644 (file)
@@ -412,7 +412,7 @@ static inline void mdt_fail_write(const struct lu_context *ctx,
                                   struct dt_device *dd, int id)
 {
         if (OBD_FAIL_CHECK(id)) {
-                CERROR(LUSTRE_MDT0_NAME": obd_fail_loc=%x, fail write ops\n",
+                CERROR(LUSTRE_MDT_NAME": obd_fail_loc=%x, fail write ops\n",
                        id);
                 dd->dd_ops->dt_ro(ctx, dd, 0);
                 /* We set FAIL_ONCE because we never "un-fail" a device */
@@ -423,14 +423,14 @@ static inline void mdt_fail_write(const struct lu_context *ctx,
 #define MDT_FAIL_CHECK(id)                                              \
 ({                                                                      \
         if (OBD_FAIL_CHECK(id))                                         \
-                CERROR(LUSTRE_MDT0_NAME": " #id " test failed\n");      \
+                CERROR(LUSTRE_MDT_NAME": " #id " test failed\n");      \
         OBD_FAIL_CHECK(id);                                             \
 })
 
 #define MDT_FAIL_CHECK_ONCE(id)                                              \
 ({      int _ret_ = 0;                                                       \
         if (OBD_FAIL_CHECK(id)) {                                            \
-                CERROR(LUSTRE_MDT0_NAME": *** obd_fail_loc=%x ***\n", id);   \
+                CERROR(LUSTRE_MDT_NAME": *** obd_fail_loc=%x ***\n", id);   \
                 obd_fail_loc |= OBD_FAILED;                                  \
                 if ((id) & OBD_FAIL_ONCE)                                    \
                         obd_fail_loc |= OBD_FAIL_ONCE;                       \
index cad741d..0270de8 100644 (file)
@@ -1284,7 +1284,7 @@ static int mgs_write_log_mdt0(struct obd_device *obd, struct fs_db *fsdb,
         
         /* FIXME this whole fn should be a single journal transaction */
         rc = record_marker(obd, llh, fsdb, CM_START, log, "add mdt");
-        rc = record_attach(obd, llh, log, LUSTRE_MDT0_NAME, uuid);
+        rc = record_attach(obd, llh, log, LUSTRE_MDT_NAME, uuid);
         rc = record_mount_opt(obd, llh, log, lovname, NULL);
         rc = record_setup(obd, llh, log, uuid, mdt_index, lovname, 0);
         rc = record_marker(obd, llh, fsdb, CM_END, log, "add mdt");
index d2a3864..9613962 100644 (file)
@@ -92,8 +92,6 @@ struct obd_type *class_get_type(const char *name)
 #ifdef CONFIG_KMOD
         if (!type) {
                 const char *modname = name;
-                if (strcmp(modname, LUSTRE_MDT_NAME) == 0)
-                        modname = LUSTRE_MDS_NAME;
                 if (!request_module(modname)) {
                         CDEBUG(D_INFO, "Loaded module '%s'\n", modname);
                         type = class_search_type(name);
index c3ea051..bc41a0b 100644 (file)
@@ -151,6 +151,7 @@ int class_attach(struct lustre_cfg *lcfg)
            mountconf flag is set.
            1.6 should set this flag, and translate the other way here
            if not set. */
+#if 0
         if (lcfg->lcfg_flags & LCFG_FLG_MOUNTCONF){
                 char *tmp = NULL;
                 if (strcmp(typename, "mds") == 0)
@@ -165,7 +166,7 @@ int class_attach(struct lustre_cfg *lcfg)
                         typename = tmp;
                 }
         }
-
+#endif
         obd = class_newdev(typename, name);
         if (IS_ERR(obd)) {
                 /* Already exists or out of obds */
index 74f1d2c..d6a1504 100644 (file)
@@ -60,7 +60,7 @@
 #include <obd_support.h>
 /* struct ptlrpc_thread */
 #include <lustre_net.h>
-/* LUSTRE_OSD0_NAME */
+/* LUSTRE_OSD_NAME */
 #include <obd.h>
 /* class_register_type(), class_unregister_type(), class_get_type() */
 #include <obd_class.h>
@@ -411,7 +411,7 @@ static int osd_object_print(const struct lu_context *ctx, void *cookie,
         struct iam_descr  *d;
 
         d = o->oo_container.ic_descr;
-        return (*p)(ctx, cookie, LUSTRE_OSD0_NAME"-object@%p(i:%p:%lu/%u)[%s]",
+        return (*p)(ctx, cookie, LUSTRE_OSD_NAME"-object@%p(i:%p:%lu/%u)[%s]",
                     o, o->oo_inode,
                     o->oo_inode ? o->oo_inode->i_ino : 0UL,
                     o->oo_inode ? o->oo_inode->i_generation : 0,
@@ -572,7 +572,7 @@ static void osd_sync(const struct lu_context *ctx,
         struct osd_device *osd = osd_dt_dev(d);
         ENTRY;
 
-        CDEBUG(D_HA, "syncing OSD %s\n", LUSTRE_OSD0_NAME);
+        CDEBUG(D_HA, "syncing OSD %s\n", LUSTRE_OSD_NAME);
         ldiskfs_force_commit(osd_sb(osd));
         EXIT;
 }
@@ -588,7 +588,7 @@ static void osd_ro(const struct lu_context *ctx, struct dt_device *d, int sync)
         struct txn_param       *param = &oti->oti_txn;
         ENTRY;
 
-        CERROR("*** setting device %s read-only ***\n", LUSTRE_OSD0_NAME);
+        CERROR("*** setting device %s read-only ***\n", LUSTRE_OSD_NAME);
 
         param->tp_credits = SYNC_DEVICE_CREDITS;
 
@@ -1780,7 +1780,7 @@ static void osd_type_fini(struct lu_device_type *t)
 }
 
 static struct lu_context_key osd_key = {
-        .lct_tags = LCT_MD_THREAD|LCT_DT_THREAD,
+        .lct_tags = LCT_DT_THREAD,
         .lct_init = osd_key_init,
         .lct_fini = osd_key_fini,
         .lct_exit = osd_key_exit
@@ -1933,6 +1933,7 @@ static int osd_process_config(const struct lu_context *ctx,
 {
         struct osd_device *o = osd_dev(d);
         int err;
+        ENTRY;
 
         switch(cfg->lcfg_command) {
         case LCFG_SETUP:
@@ -2209,7 +2210,7 @@ static struct lu_device_type_operations osd_device_type_ops = {
 
 static struct lu_device_type osd_device_type = {
         .ldt_tags     = LU_DEVICE_DT,
-        .ldt_name     = LUSTRE_OSD0_NAME,
+        .ldt_name     = LUSTRE_OSD_NAME,
         .ldt_ops      = &osd_device_type_ops,
         .ldt_ctx_tags = LCT_MD_THREAD|LCT_DT_THREAD
 };
@@ -2237,16 +2238,16 @@ static int __init osd_mod_init(void)
 
         lprocfs_init_vars(osd, &lvars);
         return class_register_type(&osd_obd_device_ops, NULL, lvars.module_vars,
-                                   LUSTRE_OSD0_NAME, &osd_device_type);
+                                   LUSTRE_OSD_NAME, &osd_device_type);
 }
 
 static void __exit osd_mod_exit(void)
 {
-        class_unregister_type(LUSTRE_OSD0_NAME);
+        class_unregister_type(LUSTRE_OSD_NAME);
 }
 
 MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre Object Storage Device ("LUSTRE_OSD0_NAME")");
+MODULE_DESCRIPTION("Lustre Object Storage Device ("LUSTRE_OSD_NAME")");
 MODULE_LICENSE("GPL");
 
 cfs_module(osd, "0.0.2", osd_mod_init, osd_mod_exit);