Whamcloud - gitweb
Branch HEAD
authorhuanghua <huanghua>
Thu, 12 Feb 2009 01:38:56 +0000 (01:38 +0000)
committerhuanghua <huanghua>
Thu, 12 Feb 2009 01:38:56 +0000 (01:38 +0000)
b=11404
i=yong.fan
i=rahul.deshmukh

more debugging code.

lustre/cmm/cmm_object.c
lustre/mdd/mdd_object.c
lustre/mdt/mdt_handler.c

index bb5fd76..6f5a78a 100644 (file)
@@ -837,7 +837,8 @@ static int cmr_object_init(const struct lu_env *env, struct lu_object *lo,
 static int cmr_object_print(const struct lu_env *env, void *cookie,
                             lu_printer_t p, const struct lu_object *lo)
 {
-        return (*p)(env, cookie, "[remote]");
+        const struct cmr_object *cro = lu2cmr_obj((struct lu_object *)lo);
+        return (*p)(env, cookie, "[remote](mds_num=%d)", cro->cmo_num);
 }
 
 static const struct lu_object_operations cmr_obj_ops = {
index a2ce991..c6bc349 100644 (file)
@@ -304,7 +304,11 @@ static void mdd_object_free(const struct lu_env *env, struct lu_object *o)
 static int mdd_object_print(const struct lu_env *env, void *cookie,
                             lu_printer_t p, const struct lu_object *o)
 {
-        return (*p)(env, cookie, LUSTRE_MDD_NAME"-object@%p", o);
+        struct mdd_object *mdd = lu2mdd_obj((struct lu_object *)o);
+        return (*p)(env, cookie, LUSTRE_MDD_NAME"-object@%p(open_count=%d, "
+                    "valid=%x, cltime=%llu, flags=%lx",
+                    mdd, mdd->mod_count, mdd->mod_valid,
+                    mdd->mod_cltime, mdd->mod_flags);
 }
 
 static const struct lu_object_operations mdd_lu_obj_ops = {
index f95d6b4..d164c65 100644 (file)
@@ -4722,6 +4722,14 @@ static void mdt_object_free(const struct lu_env *env, struct lu_object *o)
         EXIT;
 }
 
+static int mdt_object_print(const struct lu_env *env, void *cookie,
+                            lu_printer_t p, const struct lu_object *o)
+{
+        struct mdt_object *mdto = mdt_obj((struct lu_object *)o);
+        return (*p)(env, cookie, LUSTRE_MDT_NAME"-object@%p(ioepoch=%llu "
+                   "flags=%llx)", mdto, mdto->mot_ioepoch, mdto->mot_flags);
+}
+
 static const struct lu_device_operations mdt_lu_ops = {
         .ldo_object_alloc   = mdt_object_alloc,
         .ldo_process_config = mdt_process_config,
@@ -4729,7 +4737,8 @@ static const struct lu_device_operations mdt_lu_ops = {
 
 static const struct lu_object_operations mdt_obj_ops = {
         .loo_object_init    = mdt_object_init,
-        .loo_object_free    = mdt_object_free
+        .loo_object_free    = mdt_object_free,
+        .loo_object_print   = mdt_object_print
 };
 
 static int mdt_obd_set_info_async(struct obd_export *exp,