Whamcloud - gitweb
use calls to lu_object_fid()
authornikita <nikita>
Tue, 16 May 2006 17:01:10 +0000 (17:01 +0000)
committernikita <nikita>
Tue, 16 May 2006 17:01:10 +0000 (17:01 +0000)
lustre/cmm/cmm_object.c
lustre/cmm/mdc_object.c

index ee1ec77..4bc3e9e 100644 (file)
@@ -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 */
index 3953bf1..c3a73b3 100644 (file)
@@ -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;