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 */
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;
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 */
{
//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;
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;