From e7c8f674d7da5d83044a09561ba5e951160eb930 Mon Sep 17 00:00:00 2001 From: nikita Date: Tue, 16 May 2006 17:01:10 +0000 Subject: [PATCH] use calls to lu_object_fid() --- lustre/cmm/cmm_object.c | 6 +++--- lustre/cmm/mdc_object.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lustre/cmm/cmm_object.c b/lustre/cmm/cmm_object.c index ee1ec77..4bc3e9e 100644 --- a/lustre/cmm/cmm_object.c +++ b/lustre/cmm/cmm_object.c @@ -39,7 +39,7 @@ static struct md_object_operations cmm_mo_ops; static struct md_dir_operations cmm_dir_ops; static struct lu_object_operations cmm_obj_ops; -static int cmm_fld_lookup(struct lu_fid *fid) +static int cmm_fld_lookup(const struct lu_fid *fid) { int rc; /* temporary hack for proto mkdir */ @@ -92,7 +92,7 @@ int cmm_object_init(struct lu_context *ctx, struct lu_object *o) struct cmm_device *d = lu2cmm_dev(o->lo_dev); struct lu_device *under; struct lu_object *below; - struct lu_fid *fid = &o->lo_header->loh_fid; + const struct lu_fid *fid = lu_object_fid(o); int mdsnum; ENTRY; @@ -167,7 +167,7 @@ int cmm_mkdir(struct lu_context *ctx, struct lu_attr *attr, rc = local->mo_dir_ops->mdo_mkdir(ctx, attr, local, name, cmm2child_obj(cmm_c)); } else { - struct lu_fid *fid = &c->mo_lu.lo_header->loh_fid; + const struct lu_fid *fid = lu_object_fid(&c->mo_lu); struct md_object *remote = cmm2child_obj(cmm_c); /* remote object creation and local name insert */ diff --git a/lustre/cmm/mdc_object.c b/lustre/cmm/mdc_object.c index 3953bf1..c3a73b3 100644 --- a/lustre/cmm/mdc_object.c +++ b/lustre/cmm/mdc_object.c @@ -66,7 +66,7 @@ int mdc_object_init(struct lu_context *ctx, struct lu_object *lo) { //struct mdc_device *d = lu2mdc_dev(o->lo_dev); //struct lu_device *under; - //struct lu_fid *fid = &o->lo_header->loh_fid; + //const struct lu_fid *fid = lu_object_fid(o); ENTRY; @@ -126,7 +126,7 @@ static int mdc_object_create(struct lu_context *ctx, struct md_object *mo, rec->cr_fsuid = attr->la_uid; rec->cr_fsgid = attr->la_gid; rec->cr_cap = 0;//cap_effective; - rec->cr_fid1 = mo->mo_lu.lo_header->loh_fid; + rec->cr_fid1 = *lu_object_fid(&mo->mo_lu); memset(&rec->cr_fid2, 0, sizeof(rec->cr_fid2)); rec->cr_mode = attr->la_mode; rec->cr_rdev = 0;//rdev; -- 1.8.3.1