From 8c801c728822ba232f08272145b0cd4f11fdf7c5 Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Mon, 1 Apr 2013 10:22:05 -0500 Subject: [PATCH] LU-2082 osp: print address of object in osp_object_create() 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 Change-Id: I566e77c69ad486feac4a4d06a9af9e33f884d7e9 Reviewed-on: http://review.whamcloud.com/5903 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Mike Pershin Reviewed-by: Andreas Dilger Reviewed-by: wangdi --- lustre/osp/osp_md_object.c | 6 ++++-- lustre/osp/osp_object.c | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lustre/osp/osp_md_object.c b/lustre/osp/osp_md_object.c index 390000c..9a59588 100644 --- a/lustre/osp/osp_md_object.c +++ b/lustre/osp/osp_md_object.c @@ -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; } diff --git a/lustre/osp/osp_object.c b/lustre/osp/osp_object.c index 0af3dd5..fa1ec71 100644 --- a/lustre/osp/osp_object.c +++ b/lustre/osp/osp_object.c @@ -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, -- 1.8.3.1