Whamcloud - gitweb
LU-2082 osp: print address of object in osp_object_create()
authorJohn L. Hammond <john.hammond@intel.com>
Mon, 1 Apr 2013 15:22:05 +0000 (10:22 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 11 Jun 2013 15:59:05 +0000 (11:59 -0400)
In osp_object_create() fix the debug and assert messages to print the
address of the OSP object under consideration rather than the address
of the function osp_obj().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I566e77c69ad486feac4a4d06a9af9e33f884d7e9
Reviewed-on: http://review.whamcloud.com/5903
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
lustre/osp/osp_md_object.c
lustre/osp/osp_object.c

index 390000c..9a59588 100644 (file)
@@ -934,9 +934,11 @@ static void osp_it_put(const struct lu_env *env, struct dt_it *di)
 static int osp_it_next(const struct lu_env *env, struct dt_it *di)
 {
        struct dt_object *dt = (struct dt_object *)di;
-       struct osp_object *osp_obj = dt2osp_obj(dt);
-       if (osp_obj->opo_empty)
+       struct osp_object *o = dt2osp_obj(dt);
+
+       if (o->opo_empty)
                return 1;
+
        return 0;
 }
 
index 0af3dd5..fa1ec71 100644 (file)
@@ -241,8 +241,8 @@ static int osp_object_create(const struct lu_env *env, struct dt_object *dt,
 
        memcpy(fid, lu_object_fid(&dt->do_lu), sizeof(*fid));
 
-       LASSERTF(fid_is_sane(fid), "fid for osp_obj %p is insane"DFID"!\n",
-                osp_obj, PFID(fid));
+       LASSERTF(fid_is_sane(fid), "fid for osp_object %p is insane"DFID"!\n",
+                o, PFID(fid));
 
        if (!o->opo_reserved) {
                /* special case, id was assigned outside of transaction
@@ -252,7 +252,7 @@ static int osp_object_create(const struct lu_env *env, struct dt_object *dt,
                spin_unlock(&d->opd_pre_lock);
        }
 
-       CDEBUG(D_INODE, "fid for osp_obj %p is "DFID"!\n", osp_obj, PFID(fid));
+       CDEBUG(D_INODE, "fid for osp_object %p is "DFID"\n", o, PFID(fid));
 
        /* If the precreate ends, it means it will be ready to rollover to
         * the new sequence soon, all the creation should be synchronized,