Whamcloud - gitweb
LU-2675 mdt: add mbo_ prefix to members of struct mdt_body 02/10202/4
authorJohn L. Hammond <john.hammond@intel.com>
Fri, 2 May 2014 23:39:06 +0000 (18:39 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 4 Jun 2014 23:06:12 +0000 (23:06 +0000)
Rename each member of struct mdt_body, adding the prefix mbo_.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: If229b803a5ccdb27378f6fc44445c1c9bf120d8b
Reviewed-on: http://review.whamcloud.com/10202
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
31 files changed:
lustre/include/lustre/lustre_idl.h
lustre/include/lustre_mdc.h
lustre/lclient/lcommon_cl.c
lustre/llite/dir.c
lustre/llite/file.c
lustre/llite/llite_lib.c
lustre/llite/llite_nfs.c
lustre/llite/namei.c
lustre/llite/statahead.c
lustre/llite/symlink.c
lustre/llite/xattr.c
lustre/llite/xattr_cache.c
lustre/lmv/lmv_intent.c
lustre/lmv/lmv_obd.c
lustre/mdc/mdc_lib.c
lustre/mdc/mdc_locks.c
lustre/mdc/mdc_reint.c
lustre/mdc/mdc_request.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_hsm.c
lustre/mdt/mdt_idmap.c
lustre/mdt/mdt_lib.c
lustre/mdt/mdt_open.c
lustre/mdt/mdt_recovery.c
lustre/mdt/mdt_reint.c
lustre/mdt/mdt_xattr.c
lustre/ptlrpc/pack_generic.c
lustre/ptlrpc/wiretest.c
lustre/target/tgt_handler.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c

index 6aec746..bc061c4 100644 (file)
@@ -2306,42 +2306,42 @@ enum md_transient_state {
 };
 
 struct mdt_body {
 };
 
 struct mdt_body {
-        struct lu_fid  fid1;
-        struct lu_fid  fid2;
-        struct lustre_handle handle;
-        __u64          valid;
-        __u64          size;   /* Offset, in the case of MDS_READPAGE */
-       obd_time        mtime;
-       obd_time        atime;
-       obd_time        ctime;
-        __u64          blocks; /* XID, in the case of MDS_READPAGE */
-        __u64          ioepoch;
-       __u64          t_state; /* transient file state defined in
-                                * enum md_transient_state
-                                * was "ino" until 2.4.0 */
-        __u32          fsuid;
-        __u32          fsgid;
-        __u32          capability;
-        __u32          mode;
-        __u32          uid;
-        __u32          gid;
-        __u32          flags; /* from vfs for pin/unpin, LUSTRE_BFLAG close */
-        __u32          rdev;
-        __u32          nlink; /* #bytes to read in the case of MDS_READPAGE */
-       __u32          unused2; /* was "generation" until 2.4.0 */
-        __u32          suppgid;
-        __u32          eadatasize;
-        __u32          aclsize;
-        __u32          max_mdsize;
-        __u32          max_cookiesize;
-        __u32          uid_h; /* high 32-bits of uid, for FUID */
-        __u32          gid_h; /* high 32-bits of gid, for FUID */
-        __u32          padding_5; /* also fix lustre_swab_mdt_body */
-        __u64          padding_6;
-        __u64          padding_7;
-        __u64          padding_8;
-        __u64          padding_9;
-        __u64          padding_10;
+       struct lu_fid mbo_fid1;
+       struct lu_fid mbo_fid2;
+       struct lustre_handle mbo_handle;
+       __u64   mbo_valid;
+       __u64   mbo_size; /* Offset, in the case of MDS_READPAGE */
+       obd_time mbo_mtime;
+       obd_time mbo_atime;
+       obd_time mbo_ctime;
+       __u64   mbo_blocks; /* XID, in the case of MDS_READPAGE */
+       __u64   mbo_ioepoch;
+       __u64   mbo_t_state; /* transient file state defined in
+                             * enum md_transient_state
+                             * was "ino" until 2.4.0 */
+       __u32   mbo_fsuid;
+       __u32   mbo_fsgid;
+       __u32   mbo_capability;
+       __u32   mbo_mode;
+       __u32   mbo_uid;
+       __u32   mbo_gid;
+       __u32   mbo_flags;
+       __u32   mbo_rdev;
+       __u32   mbo_nlink; /* #bytes to read in the case of MDS_READPAGE */
+       __u32   mbo_unused2; /* was "generation" until 2.4.0 */
+       __u32   mbo_suppgid;
+       __u32   mbo_eadatasize;
+       __u32   mbo_aclsize;
+       __u32   mbo_max_mdsize;
+       __u32   mbo_max_cookiesize;
+       __u32   mbo_uid_h; /* high 32-bits of uid, for FUID */
+       __u32   mbo_gid_h; /* high 32-bits of gid, for FUID */
+       __u32   mbo_padding_5; /* also fix lustre_swab_mdt_body */
+       __u64   mbo_padding_6;
+       __u64   mbo_padding_7;
+       __u64   mbo_padding_8;
+       __u64   mbo_padding_9;
+       __u64   mbo_padding_10;
 }; /* 216 */
 
 extern void lustre_swab_mdt_body (struct mdt_body *b);
 }; /* 216 */
 
 extern void lustre_swab_mdt_body (struct mdt_body *b);
index 9f6edd3..040b975 100644 (file)
@@ -174,18 +174,20 @@ static inline void mdc_put_rpc_lock(struct mdc_rpc_lock *lck,
 static inline void mdc_update_max_ea_from_body(struct obd_export *exp,
                                               struct mdt_body *body)
 {
 static inline void mdc_update_max_ea_from_body(struct obd_export *exp,
                                               struct mdt_body *body)
 {
-       if (body->valid & OBD_MD_FLMODEASIZE) {
+       if (body->mbo_valid & OBD_MD_FLMODEASIZE) {
                struct client_obd *cli = &exp->exp_obd->u.cli;
 
                struct client_obd *cli = &exp->exp_obd->u.cli;
 
-               if (cli->cl_max_mds_easize < body->max_mdsize) {
-                       cli->cl_max_mds_easize = body->max_mdsize;
+               if (cli->cl_max_mds_easize < body->mbo_max_mdsize) {
+                       cli->cl_max_mds_easize = body->mbo_max_mdsize;
                        cli->cl_default_mds_easize =
                        cli->cl_default_mds_easize =
-                           min_t(__u32, body->max_mdsize, PAGE_CACHE_SIZE);
+                               min_t(__u32, body->mbo_max_mdsize,
+                                     PAGE_CACHE_SIZE);
                }
                }
-               if (cli->cl_max_mds_cookiesize < body->max_cookiesize) {
-                       cli->cl_max_mds_cookiesize = body->max_cookiesize;
+               if (cli->cl_max_mds_cookiesize < body->mbo_max_cookiesize) {
+                       cli->cl_max_mds_cookiesize = body->mbo_max_cookiesize;
                        cli->cl_default_mds_cookiesize =
                        cli->cl_default_mds_cookiesize =
-                           min_t(__u32, body->max_cookiesize, PAGE_CACHE_SIZE);
+                           min_t(__u32, body->mbo_max_cookiesize,
+                                 PAGE_CACHE_SIZE);
                }
        }
 }
                }
        }
 }
index 22adcc4..0b9e773 100644 (file)
@@ -1133,7 +1133,7 @@ int cl_file_inode_init(struct inode *inode, struct lustre_md *md)
         int result = 0;
         int refcheck;
 
         int result = 0;
         int refcheck;
 
-        LASSERT(md->body->valid & OBD_MD_FLID);
+       LASSERT(md->body->mbo_valid & OBD_MD_FLID);
         LASSERT(S_ISREG(cl_inode_mode(inode)));
 
         env = cl_env_get(&refcheck);
         LASSERT(S_ISREG(cl_inode_mode(inode)));
 
         env = cl_env_get(&refcheck);
index 5a5079a..6ef796a 100644 (file)
@@ -603,9 +603,9 @@ int ll_dir_getstripe(struct inode *inode, void **plmm, int *plmm_size,
        body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
        LASSERT(body != NULL);
 
        body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
        LASSERT(body != NULL);
 
-       lmm_size = body->eadatasize;
+       lmm_size = body->mbo_eadatasize;
 
 
-       if (!(body->valid & (OBD_MD_FLEASIZE | OBD_MD_FLDIREA)) ||
+       if (!(body->mbo_valid & (OBD_MD_FLEASIZE | OBD_MD_FLDIREA)) ||
            lmm_size == 0) {
                GOTO(out, rc = -ENODATA);
        }
            lmm_size == 0) {
                GOTO(out, rc = -ENODATA);
        }
@@ -1365,21 +1365,21 @@ out_rmdir:
                         struct lov_user_mds_data *lmdp;
                         lstat_t st = { 0 };
 
                         struct lov_user_mds_data *lmdp;
                         lstat_t st = { 0 };
 
-                        st.st_dev     = inode->i_sb->s_dev;
-                        st.st_mode    = body->mode;
-                        st.st_nlink   = body->nlink;
-                        st.st_uid     = body->uid;
-                        st.st_gid     = body->gid;
-                        st.st_rdev    = body->rdev;
-                        st.st_size    = body->size;
-                       st.st_blksize = PAGE_CACHE_SIZE;
-                        st.st_blocks  = body->blocks;
-                        st.st_atime   = body->atime;
-                        st.st_mtime   = body->mtime;
-                        st.st_ctime   = body->ctime;
-                        st.st_ino     = inode->i_ino;
-
-                        lmdp = (struct lov_user_mds_data *)arg;
+                       st.st_dev       = inode->i_sb->s_dev;
+                       st.st_mode      = body->mbo_mode;
+                       st.st_nlink     = body->mbo_nlink;
+                       st.st_uid       = body->mbo_uid;
+                       st.st_gid       = body->mbo_gid;
+                       st.st_rdev      = body->mbo_rdev;
+                       st.st_size      = body->mbo_size;
+                       st.st_blksize   = PAGE_CACHE_SIZE;
+                       st.st_blocks    = body->mbo_blocks;
+                       st.st_atime     = body->mbo_atime;
+                       st.st_mtime     = body->mbo_mtime;
+                       st.st_ctime     = body->mbo_ctime;
+                       st.st_ino       = inode->i_ino;
+
+                       lmdp = (struct lov_user_mds_data *)arg;
                        if (copy_to_user(&lmdp->lmd_st, &st, sizeof(st)))
                                 GOTO(out_req, rc = -EFAULT);
                 }
                        if (copy_to_user(&lmdp->lmd_st, &st, sizeof(st)))
                                 GOTO(out_req, rc = -EFAULT);
                 }
index 2d2451b..8f7321d 100644 (file)
@@ -208,7 +208,7 @@ static int ll_close_inode_openhandle(struct obd_export *md_exp,
        if (rc == 0 && op_data->op_bias & MDS_HSM_RELEASE) {
                struct mdt_body *body;
                body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
        if (rc == 0 && op_data->op_bias & MDS_HSM_RELEASE) {
                struct mdt_body *body;
                body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
-               if (!(body->valid & OBD_MD_FLRELEASED))
+               if (!(body->mbo_valid & OBD_MD_FLRELEASED))
                        rc = -EBUSY;
        }
 
                        rc = -EBUSY;
        }
 
@@ -506,8 +506,8 @@ static int ll_och_fill(struct obd_export *md_exp, struct lookup_intent *it,
        struct mdt_body *body;
 
        body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
        struct mdt_body *body;
 
        body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
-       och->och_fh = body->handle;
-       och->och_fid = body->fid1;
+       och->och_fh = body->mbo_handle;
+       och->och_fid = body->mbo_fid1;
        och->och_lease_handle.cookie = it->d.lustre.it_lock_handle;
        och->och_magic = OBD_CLIENT_HANDLE_MAGIC;
        och->och_flags = it->it_flags;
        och->och_lease_handle.cookie = it->d.lustre.it_lock_handle;
        och->och_magic = OBD_CLIENT_HANDLE_MAGIC;
        och->och_flags = it->it_flags;
@@ -536,7 +536,7 @@ static int ll_local_open(struct file *file, struct lookup_intent *it,
                        RETURN(rc);
 
                body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
                        RETURN(rc);
 
                body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
-               ll_ioepoch_open(lli, body->ioepoch);
+               ll_ioepoch_open(lli, body->mbo_ioepoch);
        }
 
        LUSTRE_FPRIVATE(file) = fd;
        }
 
        LUSTRE_FPRIVATE(file) = fd;
@@ -1571,9 +1571,9 @@ int ll_lov_getstripe_ea_info(struct inode *inode, const char *filename,
         body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
         LASSERT(body != NULL); /* checked by mdc_getattr_name */
 
         body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
         LASSERT(body != NULL); /* checked by mdc_getattr_name */
 
-        lmmsize = body->eadatasize;
+       lmmsize = body->mbo_eadatasize;
 
 
-        if (!(body->valid & (OBD_MD_FLEASIZE | OBD_MD_FLDIREA)) ||
+       if (!(body->mbo_valid & (OBD_MD_FLEASIZE | OBD_MD_FLDIREA)) ||
                         lmmsize == 0) {
                 GOTO(out, rc = -ENODATA);
         }
                         lmmsize == 0) {
                 GOTO(out, rc = -ENODATA);
         }
@@ -1602,13 +1602,14 @@ int ll_lov_getstripe_ea_info(struct inode *inode, const char *filename,
                  * avoid swab not existent lsm objects */
                 if (lmm->lmm_magic == cpu_to_le32(LOV_MAGIC_V1)) {
                         lustre_swab_lov_user_md_v1((struct lov_user_md_v1 *)lmm);
                  * avoid swab not existent lsm objects */
                 if (lmm->lmm_magic == cpu_to_le32(LOV_MAGIC_V1)) {
                         lustre_swab_lov_user_md_v1((struct lov_user_md_v1 *)lmm);
-                        if (S_ISREG(body->mode))
-                                lustre_swab_lov_user_md_objects(
-                                 ((struct lov_user_md_v1 *)lmm)->lmm_objects,
-                                 stripe_count);
-                } else if (lmm->lmm_magic == cpu_to_le32(LOV_MAGIC_V3)) {
-                        lustre_swab_lov_user_md_v3((struct lov_user_md_v3 *)lmm);
-                        if (S_ISREG(body->mode))
+                       if (S_ISREG(body->mbo_mode))
+                               lustre_swab_lov_user_md_objects(
+                                   ((struct lov_user_md_v1 *)lmm)->lmm_objects,
+                                   stripe_count);
+               } else if (lmm->lmm_magic == cpu_to_le32(LOV_MAGIC_V3)) {
+                       lustre_swab_lov_user_md_v3(
+                               (struct lov_user_md_v3 *)lmm);
+                       if (S_ISREG(body->mbo_mode))
                                 lustre_swab_lov_user_md_objects(
                                  ((struct lov_user_md_v3 *)lmm)->lmm_objects,
                                  stripe_count);
                                 lustre_swab_lov_user_md_objects(
                                  ((struct lov_user_md_v3 *)lmm)->lmm_objects,
                                  stripe_count);
@@ -3045,7 +3046,7 @@ int ll_get_fid_by_name(struct inode *parent, const char *name,
        if (body == NULL)
                GOTO(out_req, rc = -EFAULT);
        if (fid != NULL)
        if (body == NULL)
                GOTO(out_req, rc = -EFAULT);
        if (fid != NULL)
-               *fid = body->fid1;
+               *fid = body->mbo_fid1;
 out_req:
        ptlrpc_req_finished(req);
        RETURN(rc);
 out_req:
        ptlrpc_req_finished(req);
        RETURN(rc);
@@ -3835,7 +3836,7 @@ static int ll_layout_fetch(struct inode *inode, struct ldlm_lock *lock)
        if (body == NULL)
                GOTO(out, rc = -EPROTO);
 
        if (body == NULL)
                GOTO(out, rc = -EPROTO);
 
-       lmmsize = body->eadatasize;
+       lmmsize = body->mbo_eadatasize;
        if (lmmsize == 0) /* empty layout */
                GOTO(out, rc = 0);
 
        if (lmmsize == 0) /* empty layout */
                GOTO(out, rc = 0);
 
index 4c5dcec..c5b6210 100644 (file)
@@ -1241,7 +1241,7 @@ static struct inode *ll_iget_anon_dir(struct super_block *sb,
                struct lmv_stripe_md *lsm = md->lmv;
 
                inode->i_mode = (inode->i_mode & ~S_IFMT) |
                struct lmv_stripe_md *lsm = md->lmv;
 
                inode->i_mode = (inode->i_mode & ~S_IFMT) |
-                               (body->mode & S_IFMT);
+                               (body->mbo_mode & S_IFMT);
                LASSERTF(S_ISDIR(inode->i_mode), "Not slave inode "DFID"\n",
                         PFID(fid));
 
                LASSERTF(S_ISDIR(inode->i_mode), "Not slave inode "DFID"\n",
                         PFID(fid));
 
@@ -1260,7 +1260,7 @@ static struct inode *ll_iget_anon_dir(struct super_block *sb,
 
                LASSERT(lsm != NULL);
                /* master object FID */
 
                LASSERT(lsm != NULL);
                /* master object FID */
-               lli->lli_pfid = body->fid1;
+               lli->lli_pfid = body->mbo_fid1;
                CDEBUG(D_INODE, "lli %p slave "DFID" master "DFID"\n",
                       lli, PFID(fid), PFID(&lli->lli_pfid));
                unlock_new_inode(inode);
                CDEBUG(D_INODE, "lli %p slave "DFID" master "DFID"\n",
                       lli, PFID(fid), PFID(&lli->lli_pfid));
                unlock_new_inode(inode);
@@ -1536,8 +1536,8 @@ int ll_md_setattr(struct dentry *dentry, struct md_op_data *op_data,
        op_data->op_attr.ia_valid = ia_valid;
 
         /* Extract epoch data if obtained. */
        op_data->op_attr.ia_valid = ia_valid;
 
         /* Extract epoch data if obtained. */
-        op_data->op_handle = md.body->handle;
-        op_data->op_ioepoch = md.body->ioepoch;
+       op_data->op_handle = md.body->mbo_handle;
+       op_data->op_ioepoch = md.body->mbo_ioepoch;
 
        rc = ll_update_inode(inode, &md);
        ptlrpc_req_finished(request);
 
        rc = ll_update_inode(inode, &md);
        ptlrpc_req_finished(request);
@@ -1927,7 +1927,7 @@ int ll_update_inode(struct inode *inode, struct lustre_md *md)
        struct lov_stripe_md *lsm = md->lsm;
        struct ll_sb_info *sbi = ll_i2sbi(inode);
 
        struct lov_stripe_md *lsm = md->lsm;
        struct ll_sb_info *sbi = ll_i2sbi(inode);
 
-       LASSERT ((lsm != NULL) == ((body->valid & OBD_MD_FLEASIZE) != 0));
+       LASSERT((lsm != NULL) == ((body->mbo_valid & OBD_MD_FLEASIZE) != 0));
        if (lsm != NULL) {
                if (!lli->lli_has_smd &&
                    !(sbi->ll_flags & LL_SBI_LAYOUT_LOCK))
        if (lsm != NULL) {
                if (!lli->lli_has_smd &&
                    !(sbi->ll_flags & LL_SBI_LAYOUT_LOCK))
@@ -1947,11 +1947,11 @@ int ll_update_inode(struct inode *inode, struct lustre_md *md)
        }
 
        if (sbi->ll_flags & LL_SBI_RMT_CLIENT) {
        }
 
        if (sbi->ll_flags & LL_SBI_RMT_CLIENT) {
-                if (body->valid & OBD_MD_FLRMTPERM)
-                        ll_update_remote_perm(inode, md->remote_perm);
-        }
+               if (body->mbo_valid & OBD_MD_FLRMTPERM)
+                       ll_update_remote_perm(inode, md->remote_perm);
+       }
 #ifdef CONFIG_FS_POSIX_ACL
 #ifdef CONFIG_FS_POSIX_ACL
-       else if (body->valid & OBD_MD_FLACL) {
+       else if (body->mbo_valid & OBD_MD_FLACL) {
                spin_lock(&lli->lli_lock);
                if (lli->lli_posix_acl)
                        posix_acl_release(lli->lli_posix_acl);
                spin_lock(&lli->lli_lock);
                if (lli->lli_posix_acl)
                        posix_acl_release(lli->lli_posix_acl);
@@ -1959,66 +1959,74 @@ int ll_update_inode(struct inode *inode, struct lustre_md *md)
                spin_unlock(&lli->lli_lock);
        }
 #endif
                spin_unlock(&lli->lli_lock);
        }
 #endif
-       inode->i_ino = cl_fid_build_ino(&body->fid1,
+       inode->i_ino = cl_fid_build_ino(&body->mbo_fid1,
                                        sbi->ll_flags & LL_SBI_32BIT_API);
                                        sbi->ll_flags & LL_SBI_32BIT_API);
-       inode->i_generation = cl_fid_build_gen(&body->fid1);
+       inode->i_generation = cl_fid_build_gen(&body->mbo_fid1);
 
 
-        if (body->valid & OBD_MD_FLATIME) {
-                if (body->atime > LTIME_S(inode->i_atime))
-                        LTIME_S(inode->i_atime) = body->atime;
-                lli->lli_lvb.lvb_atime = body->atime;
-        }
-        if (body->valid & OBD_MD_FLMTIME) {
-                if (body->mtime > LTIME_S(inode->i_mtime)) {
-                        CDEBUG(D_INODE, "setting ino %lu mtime from %lu "
-                               "to "LPU64"\n", inode->i_ino,
-                               LTIME_S(inode->i_mtime), body->mtime);
-                        LTIME_S(inode->i_mtime) = body->mtime;
-                }
-                lli->lli_lvb.lvb_mtime = body->mtime;
-        }
-        if (body->valid & OBD_MD_FLCTIME) {
-                if (body->ctime > LTIME_S(inode->i_ctime))
-                        LTIME_S(inode->i_ctime) = body->ctime;
-                lli->lli_lvb.lvb_ctime = body->ctime;
-        }
-        if (body->valid & OBD_MD_FLMODE)
-                inode->i_mode = (inode->i_mode & S_IFMT)|(body->mode & ~S_IFMT);
-        if (body->valid & OBD_MD_FLTYPE)
-                inode->i_mode = (inode->i_mode & ~S_IFMT)|(body->mode & S_IFMT);
-        LASSERT(inode->i_mode != 0);
-        if (S_ISREG(inode->i_mode)) {
-                inode->i_blkbits = min(PTLRPC_MAX_BRW_BITS + 1, LL_MAX_BLKSIZE_BITS);
-        } else {
-                inode->i_blkbits = inode->i_sb->s_blocksize_bits;
-        }
-       if (body->valid & OBD_MD_FLUID)
-               inode->i_uid = make_kuid(&init_user_ns, body->uid);
-       if (body->valid & OBD_MD_FLGID)
-               inode->i_gid = make_kgid(&init_user_ns, body->gid);
-       if (body->valid & OBD_MD_FLFLAGS)
-               inode->i_flags = ll_ext_to_inode_flags(body->flags);
-       if (body->valid & OBD_MD_FLNLINK)
-               set_nlink(inode, body->nlink);
-       if (body->valid & OBD_MD_FLRDEV)
-               inode->i_rdev = old_decode_dev(body->rdev);
-
-       if (body->valid & OBD_MD_FLID) {
+       if (body->mbo_valid & OBD_MD_FLATIME) {
+               if (body->mbo_atime > LTIME_S(inode->i_atime))
+                       LTIME_S(inode->i_atime) = body->mbo_atime;
+               lli->lli_lvb.lvb_atime = body->mbo_atime;
+       }
+
+       if (body->mbo_valid & OBD_MD_FLMTIME) {
+               if (body->mbo_mtime > LTIME_S(inode->i_mtime)) {
+                       CDEBUG(D_INODE, "setting ino %lu mtime from %lu "
+                              "to "LPU64"\n", inode->i_ino,
+                              LTIME_S(inode->i_mtime), body->mbo_mtime);
+                       LTIME_S(inode->i_mtime) = body->mbo_mtime;
+               }
+               lli->lli_lvb.lvb_mtime = body->mbo_mtime;
+       }
+
+       if (body->mbo_valid & OBD_MD_FLCTIME) {
+               if (body->mbo_ctime > LTIME_S(inode->i_ctime))
+                       LTIME_S(inode->i_ctime) = body->mbo_ctime;
+               lli->lli_lvb.lvb_ctime = body->mbo_ctime;
+       }
+
+       if (body->mbo_valid & OBD_MD_FLMODE)
+               inode->i_mode = (inode->i_mode & S_IFMT) |
+                               (body->mbo_mode & ~S_IFMT);
+
+       if (body->mbo_valid & OBD_MD_FLTYPE)
+               inode->i_mode = (inode->i_mode & ~S_IFMT) |
+                               (body->mbo_mode & S_IFMT);
+
+       LASSERT(inode->i_mode != 0);
+       if (S_ISREG(inode->i_mode))
+               inode->i_blkbits = min(PTLRPC_MAX_BRW_BITS + 1,
+                                      LL_MAX_BLKSIZE_BITS);
+       else
+               inode->i_blkbits = inode->i_sb->s_blocksize_bits;
+
+       if (body->mbo_valid & OBD_MD_FLUID)
+               inode->i_uid = make_kuid(&init_user_ns, body->mbo_uid);
+       if (body->mbo_valid & OBD_MD_FLGID)
+               inode->i_gid = make_kgid(&init_user_ns, body->mbo_gid);
+       if (body->mbo_valid & OBD_MD_FLFLAGS)
+               inode->i_flags = ll_ext_to_inode_flags(body->mbo_flags);
+       if (body->mbo_valid & OBD_MD_FLNLINK)
+               set_nlink(inode, body->mbo_nlink);
+       if (body->mbo_valid & OBD_MD_FLRDEV)
+               inode->i_rdev = old_decode_dev(body->mbo_rdev);
+
+       if (body->mbo_valid & OBD_MD_FLID) {
                /* FID shouldn't be changed! */
                if (fid_is_sane(&lli->lli_fid)) {
                /* FID shouldn't be changed! */
                if (fid_is_sane(&lli->lli_fid)) {
-                       LASSERTF(lu_fid_eq(&lli->lli_fid, &body->fid1),
+                       LASSERTF(lu_fid_eq(&lli->lli_fid, &body->mbo_fid1),
                                 "Trying to change FID "DFID
                                 " to the "DFID", inode "DFID"(%p)\n",
                                 "Trying to change FID "DFID
                                 " to the "DFID", inode "DFID"(%p)\n",
-                                PFID(&lli->lli_fid), PFID(&body->fid1),
+                                PFID(&lli->lli_fid), PFID(&body->mbo_fid1),
                                 PFID(ll_inode2fid(inode)), inode);
                } else {
                                 PFID(ll_inode2fid(inode)), inode);
                } else {
-                       lli->lli_fid = body->fid1;
+                       lli->lli_fid = body->mbo_fid1;
                }
        }
 
                }
        }
 
-        LASSERT(fid_seq(&lli->lli_fid) != 0);
+       LASSERT(fid_seq(&lli->lli_fid) != 0);
 
 
-        if (body->valid & OBD_MD_FLSIZE) {
+       if (body->mbo_valid & OBD_MD_FLSIZE) {
                 if (exp_connect_som(ll_i2mdexp(inode)) &&
                    S_ISREG(inode->i_mode)) {
                         struct lustre_handle lockh;
                 if (exp_connect_som(ll_i2mdexp(inode)) &&
                    S_ISREG(inode->i_mode)) {
                         struct lustre_handle lockh;
@@ -2045,7 +2053,7 @@ int ll_update_inode(struct inode *inode, struct lustre_md *md)
                                 } else {
                                         /* Use old size assignment to avoid
                                          * deadlock bz14138 & bz14326 */
                                 } else {
                                         /* Use old size assignment to avoid
                                          * deadlock bz14138 & bz14326 */
-                                        i_size_write(inode, body->size);
+                                       i_size_write(inode, body->mbo_size);
                                        spin_lock(&lli->lli_lock);
                                         lli->lli_flags |= LLIF_MDS_SIZE_LOCK;
                                        spin_unlock(&lli->lli_lock);
                                        spin_lock(&lli->lli_lock);
                                         lli->lli_flags |= LLIF_MDS_SIZE_LOCK;
                                        spin_unlock(&lli->lli_lock);
@@ -2055,29 +2063,30 @@ int ll_update_inode(struct inode *inode, struct lustre_md *md)
                 } else {
                         /* Use old size assignment to avoid
                          * deadlock bz14138 & bz14326 */
                 } else {
                         /* Use old size assignment to avoid
                          * deadlock bz14138 & bz14326 */
-                        i_size_write(inode, body->size);
+                       i_size_write(inode, body->mbo_size);
 
                        CDEBUG(D_VFSTRACE,
                               "inode="DFID", updating i_size %llu\n",
                               PFID(ll_inode2fid(inode)),
 
                        CDEBUG(D_VFSTRACE,
                               "inode="DFID", updating i_size %llu\n",
                               PFID(ll_inode2fid(inode)),
-                              (unsigned long long)body->size);
-                }
+                              (unsigned long long)body->mbo_size);
+               }
 
 
-                if (body->valid & OBD_MD_FLBLOCKS)
-                        inode->i_blocks = body->blocks;
-        }
+               if (body->mbo_valid & OBD_MD_FLBLOCKS)
+                       inode->i_blocks = body->mbo_blocks;
+       }
 
 
-        if (body->valid & OBD_MD_FLMDSCAPA) {
-                LASSERT(md->mds_capa);
-                ll_add_capa(inode, md->mds_capa);
-        }
-        if (body->valid & OBD_MD_FLOSSCAPA) {
-                LASSERT(md->oss_capa);
-                ll_add_capa(inode, md->oss_capa);
-        }
+       if (body->mbo_valid & OBD_MD_FLMDSCAPA) {
+               LASSERT(md->mds_capa);
+               ll_add_capa(inode, md->mds_capa);
+       }
+
+       if (body->mbo_valid & OBD_MD_FLOSSCAPA) {
+               LASSERT(md->oss_capa);
+               ll_add_capa(inode, md->oss_capa);
+       }
 
 
-       if (body->valid & OBD_MD_TSTATE) {
-               if (body->t_state & MS_RESTORE)
+       if (body->mbo_valid & OBD_MD_TSTATE) {
+               if (body->mbo_t_state & MS_RESTORE)
                        lli->lli_flags |= LLIF_FILE_RESTORING;
        }
 
                        lli->lli_flags |= LLIF_FILE_RESTORING;
        }
 
@@ -2203,7 +2212,7 @@ int ll_iocontrol(struct inode *inode, struct file *file,
 
                 body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
 
 
                 body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
 
-                flags = body->flags;
+               flags = body->mbo_flags;
 
                 ptlrpc_req_finished(req);
 
 
                 ptlrpc_req_finished(req);
 
@@ -2390,9 +2399,9 @@ int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req,
                  * At this point server returns to client's same fid as client
                  * generated for creating. So using ->fid1 is okay here.
                  */
                  * At this point server returns to client's same fid as client
                  * generated for creating. So using ->fid1 is okay here.
                  */
-                LASSERT(fid_is_sane(&md.body->fid1));
+               LASSERT(fid_is_sane(&md.body->mbo_fid1));
 
 
-               *inode = ll_iget(sb, cl_fid_build_ino(&md.body->fid1,
+               *inode = ll_iget(sb, cl_fid_build_ino(&md.body->mbo_fid1,
                                             sbi->ll_flags & LL_SBI_32BIT_API),
                                 &md);
                if (IS_ERR(*inode)) {
                                             sbi->ll_flags & LL_SBI_32BIT_API),
                                 &md);
                if (IS_ERR(*inode)) {
index 3dd1183..d92424f 100644 (file)
@@ -335,10 +335,10 @@ int ll_dir_get_parent_fid(struct inode *dir, struct lu_fid *parent_fid)
         * LU-3952: MDT may lost the FID of its parent, we should not crash
         * the NFS server, ll_iget_for_nfs() will handle the error.
         */
         * LU-3952: MDT may lost the FID of its parent, we should not crash
         * the NFS server, ll_iget_for_nfs() will handle the error.
         */
-       if (body->valid & OBD_MD_FLID) {
+       if (body->mbo_valid & OBD_MD_FLID) {
                CDEBUG(D_INFO, "parent for "DFID" is "DFID"\n",
                CDEBUG(D_INFO, "parent for "DFID" is "DFID"\n",
-                      PFID(ll_inode2fid(dir)), PFID(&body->fid1));
-               *parent_fid = body->fid1;
+                      PFID(ll_inode2fid(dir)), PFID(&body->mbo_fid1));
+               *parent_fid = body->mbo_fid1;
        }
 
        ptlrpc_req_finished(req);
        }
 
        ptlrpc_req_finished(req);
index 6cd0c43..aa2b0ed 100644 (file)
@@ -78,46 +78,47 @@ static int ll_d_mountpoint(struct dentry *dparent, struct dentry *dchild,
 /* called from iget5_locked->find_inode() under inode_lock spinlock */
 static int ll_test_inode(struct inode *inode, void *opaque)
 {
 /* called from iget5_locked->find_inode() under inode_lock spinlock */
 static int ll_test_inode(struct inode *inode, void *opaque)
 {
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lustre_md     *md = opaque;
+       struct ll_inode_info    *lli = ll_i2info(inode);
+       struct lustre_md        *md = opaque;
 
 
-        if (unlikely(!(md->body->valid & OBD_MD_FLID))) {
-                CERROR("MDS body missing FID\n");
-                return 0;
-        }
+       if (unlikely(!(md->body->mbo_valid & OBD_MD_FLID))) {
+               CERROR("MDS body missing FID\n");
+               return 0;
+       }
 
 
-        if (!lu_fid_eq(&lli->lli_fid, &md->body->fid1))
-                return 0;
+       if (!lu_fid_eq(&lli->lli_fid, &md->body->mbo_fid1))
+               return 0;
 
 
-        return 1;
+       return 1;
 }
 
 static int ll_set_inode(struct inode *inode, void *opaque)
 {
 }
 
 static int ll_set_inode(struct inode *inode, void *opaque)
 {
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct mdt_body *body = ((struct lustre_md *)opaque)->body;
+       struct ll_inode_info *lli = ll_i2info(inode);
+       struct mdt_body *body = ((struct lustre_md *)opaque)->body;
 
 
-        if (unlikely(!(body->valid & OBD_MD_FLID))) {
-                CERROR("MDS body missing FID\n");
-                return -EINVAL;
-        }
+       if (unlikely(!(body->mbo_valid & OBD_MD_FLID))) {
+               CERROR("MDS body missing FID\n");
+               return -EINVAL;
+       }
 
 
-        lli->lli_fid = body->fid1;
-        if (unlikely(!(body->valid & OBD_MD_FLTYPE))) {
-                CERROR("Can not initialize inode "DFID" without object type: "
-                       "valid = "LPX64"\n", PFID(&lli->lli_fid), body->valid);
-                return -EINVAL;
-        }
+       lli->lli_fid = body->mbo_fid1;
+       if (unlikely(!(body->mbo_valid & OBD_MD_FLTYPE))) {
+               CERROR("Can not initialize inode "DFID" without object type: "
+                      "valid = "LPX64"\n",
+                      PFID(&lli->lli_fid), body->mbo_valid);
+               return -EINVAL;
+       }
 
 
-        inode->i_mode = (inode->i_mode & ~S_IFMT) | (body->mode & S_IFMT);
-        if (unlikely(inode->i_mode == 0)) {
-                CERROR("Invalid inode "DFID" type\n", PFID(&lli->lli_fid));
-                return -EINVAL;
-        }
+       inode->i_mode = (inode->i_mode & ~S_IFMT) | (body->mbo_mode & S_IFMT);
+       if (unlikely(inode->i_mode == 0)) {
+               CERROR("Invalid inode "DFID" type\n", PFID(&lli->lli_fid));
+               return -EINVAL;
+       }
 
 
-        ll_lli_init(lli);
+       ll_lli_init(lli);
 
 
-        return 0;
+       return 0;
 }
 
 
 }
 
 
@@ -158,7 +159,7 @@ struct inode *ll_iget(struct super_block *sb, ino_t hash,
        } else if (!(inode->i_state & (I_FREEING | I_CLEAR))) {
                rc = ll_update_inode(inode, md);
                CDEBUG(D_VFSTRACE, "got inode: "DFID"(%p): rc = %d\n",
        } else if (!(inode->i_state & (I_FREEING | I_CLEAR))) {
                rc = ll_update_inode(inode, md);
                CDEBUG(D_VFSTRACE, "got inode: "DFID"(%p): rc = %d\n",
-                      PFID(&md->body->fid1), inode, rc);
+                      PFID(&md->body->mbo_fid1), inode, rc);
                if (rc != 0) {
                        make_bad_inode(inode);
                        iput(inode);
                if (rc != 0) {
                        make_bad_inode(inode);
                        iput(inode);
@@ -887,20 +888,21 @@ static int ll_create_it(struct inode *dir, struct dentry *dentry, int mode,
 
 void ll_update_times(struct ptlrpc_request *request, struct inode *inode)
 {
 
 void ll_update_times(struct ptlrpc_request *request, struct inode *inode)
 {
-        struct mdt_body *body = req_capsule_server_get(&request->rq_pill,
-                                                       &RMF_MDT_BODY);
+       struct mdt_body *body = req_capsule_server_get(&request->rq_pill,
+                                                      &RMF_MDT_BODY);
 
 
-        LASSERT(body);
-        if (body->valid & OBD_MD_FLMTIME &&
-            body->mtime > LTIME_S(inode->i_mtime)) {
+       LASSERT(body);
+       if (body->mbo_valid & OBD_MD_FLMTIME &&
+           body->mbo_mtime > LTIME_S(inode->i_mtime)) {
                CDEBUG(D_INODE, "setting fid "DFID" mtime from %lu to "LPU64
                CDEBUG(D_INODE, "setting fid "DFID" mtime from %lu to "LPU64
-                               "\n", PFID(ll_inode2fid(inode)),
-                               LTIME_S(inode->i_mtime), body->mtime);
-                LTIME_S(inode->i_mtime) = body->mtime;
-        }
-        if (body->valid & OBD_MD_FLCTIME &&
-            body->ctime > LTIME_S(inode->i_ctime))
-                LTIME_S(inode->i_ctime) = body->ctime;
+                      "\n", PFID(ll_inode2fid(inode)),
+                      LTIME_S(inode->i_mtime), body->mbo_mtime);
+               LTIME_S(inode->i_mtime) = body->mbo_mtime;
+       }
+
+       if (body->mbo_valid & OBD_MD_FLCTIME &&
+           body->mbo_ctime > LTIME_S(inode->i_ctime))
+               LTIME_S(inode->i_ctime) = body->mbo_ctime;
 }
 
 static int ll_new_node(struct inode *dir, struct qstr *name,
 }
 
 static int ll_new_node(struct inode *dir, struct qstr *name,
@@ -1195,11 +1197,11 @@ int ll_objects_destroy(struct ptlrpc_request *request, struct inode *dir)
         ENTRY;
 
         /* req is swabbed so this is safe */
         ENTRY;
 
         /* req is swabbed so this is safe */
-        body = req_capsule_server_get(&request->rq_pill, &RMF_MDT_BODY);
-        if (!(body->valid & OBD_MD_FLEASIZE))
-                RETURN(0);
+       body = req_capsule_server_get(&request->rq_pill, &RMF_MDT_BODY);
+       if (!(body->mbo_valid & OBD_MD_FLEASIZE))
+               RETURN(0);
 
 
-        if (body->eadatasize == 0) {
+       if (body->mbo_eadatasize == 0) {
                 CERROR("OBD_MD_FLEASIZE set but eadatasize zero\n");
                 GOTO(out, rc = -EPROTO);
         }
                 CERROR("OBD_MD_FLEASIZE set but eadatasize zero\n");
                 GOTO(out, rc = -EPROTO);
         }
@@ -1208,11 +1210,11 @@ int ll_objects_destroy(struct ptlrpc_request *request, struct inode *dir)
          * to this file. Use this EA to unlink the objects on the OST.
          * It's opaque so we don't swab here; we leave it to obd_unpackmd() to
          * check it is complete and sensible. */
          * to this file. Use this EA to unlink the objects on the OST.
          * It's opaque so we don't swab here; we leave it to obd_unpackmd() to
          * check it is complete and sensible. */
-        eadata = req_capsule_server_sized_get(&request->rq_pill, &RMF_MDT_MD,
-                                              body->eadatasize);
-        LASSERT(eadata != NULL);
+       eadata = req_capsule_server_sized_get(&request->rq_pill, &RMF_MDT_MD,
+                                             body->mbo_eadatasize);
+       LASSERT(eadata != NULL);
 
 
-        rc = obd_unpackmd(ll_i2dtexp(dir), &lsm, eadata, body->eadatasize);
+       rc = obd_unpackmd(ll_i2dtexp(dir), &lsm, eadata, body->mbo_eadatasize);
         if (rc < 0) {
                 CERROR("obd_unpackmd: %d\n", rc);
                 GOTO(out, rc);
         if (rc < 0) {
                 CERROR("obd_unpackmd: %d\n", rc);
                 GOTO(out, rc);
@@ -1224,10 +1226,10 @@ int ll_objects_destroy(struct ptlrpc_request *request, struct inode *dir)
                 GOTO(out_free_memmd, rc = -ENOMEM);
 
        oa->o_oi = lsm->lsm_oi;
                 GOTO(out_free_memmd, rc = -ENOMEM);
 
        oa->o_oi = lsm->lsm_oi;
-        oa->o_mode = body->mode & S_IFMT;
-        oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLGROUP;
+       oa->o_mode = body->mbo_mode & S_IFMT;
+       oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLGROUP;
 
 
-        if (body->valid & OBD_MD_FLCOOKIE) {
+       if (body->mbo_valid & OBD_MD_FLCOOKIE) {
                 oa->o_valid |= OBD_MD_FLCOOKIE;
                 oti.oti_logcookies =
                         req_capsule_server_sized_get(&request->rq_pill,
                 oa->o_valid |= OBD_MD_FLCOOKIE;
                 oti.oti_logcookies =
                         req_capsule_server_sized_get(&request->rq_pill,
@@ -1236,11 +1238,11 @@ int ll_objects_destroy(struct ptlrpc_request *request, struct inode *dir)
                                                      lsm->lsm_stripe_count);
                 if (oti.oti_logcookies == NULL) {
                         oa->o_valid &= ~OBD_MD_FLCOOKIE;
                                                      lsm->lsm_stripe_count);
                 if (oti.oti_logcookies == NULL) {
                         oa->o_valid &= ~OBD_MD_FLCOOKIE;
-                        body->valid &= ~OBD_MD_FLCOOKIE;
-                }
-        }
+                       body->mbo_valid &= ~OBD_MD_FLCOOKIE;
+               }
+       }
 
 
-        if (body->valid & OBD_MD_FLOSSCAPA) {
+       if (body->mbo_valid & OBD_MD_FLOSSCAPA) {
                 rc = md_unpack_capa(ll_i2mdexp(dir), request, &RMF_CAPA2, &oc);
                 if (rc)
                         GOTO(out_free_memmd, rc);
                 rc = md_unpack_capa(ll_i2mdexp(dir), request, &RMF_CAPA2, &oc);
                 if (rc)
                         GOTO(out_free_memmd, rc);
index 591958d..ca1d789 100644 (file)
@@ -658,14 +658,15 @@ static void ll_post_statahead(struct ll_statahead_info *sai)
 
                 /* XXX: No fid in reply, this is probaly cross-ref case.
                  * SA can't handle it yet. */
 
                 /* XXX: No fid in reply, this is probaly cross-ref case.
                  * SA can't handle it yet. */
-                if (body->valid & OBD_MD_MDS)
-                        GOTO(out, rc = -EAGAIN);
-        } else {
-                /*
-                 * revalidate.
-                 */
-                /* unlinked and re-created with the same name */
-                if (unlikely(!lu_fid_eq(&minfo->mi_data.op_fid2, &body->fid1))){
+               if (body->mbo_valid & OBD_MD_MDS)
+                       GOTO(out, rc = -EAGAIN);
+       } else {
+               /*
+                * revalidate.
+                */
+               /* unlinked and re-created with the same name */
+               if (unlikely(!lu_fid_eq(&minfo->mi_data.op_fid2,
+                                       &body->mbo_fid1))) {
                         entry->se_inode = NULL;
                         iput(child);
                         child = NULL;
                         entry->se_inode = NULL;
                         iput(child);
                         child = NULL;
index 6b43a05..d5ce025 100644 (file)
@@ -86,16 +86,16 @@ static int ll_readlink_internal(struct inode *inode,
 
         body = req_capsule_server_get(&(*request)->rq_pill, &RMF_MDT_BODY);
         LASSERT(body != NULL);
 
         body = req_capsule_server_get(&(*request)->rq_pill, &RMF_MDT_BODY);
         LASSERT(body != NULL);
-        if ((body->valid & OBD_MD_LINKNAME) == 0) {
-                CERROR("OBD_MD_LINKNAME not set on reply\n");
-                GOTO(failed, rc = -EPROTO);
-        }
+       if ((body->mbo_valid & OBD_MD_LINKNAME) == 0) {
+               CERROR("OBD_MD_LINKNAME not set on reply\n");
+               GOTO(failed, rc = -EPROTO);
+       }
 
 
-        LASSERT(symlen != 0);
-        if (body->eadatasize != symlen) {
+       LASSERT(symlen != 0);
+       if (body->mbo_eadatasize != symlen) {
                CERROR("%s: inode "DFID": symlink length %d not expected %d\n",
                       ll_get_fsname(inode->i_sb, NULL, 0),
                CERROR("%s: inode "DFID": symlink length %d not expected %d\n",
                       ll_get_fsname(inode->i_sb, NULL, 0),
-                      PFID(ll_inode2fid(inode)), body->eadatasize - 1,
+                      PFID(ll_inode2fid(inode)), body->mbo_eadatasize - 1,
                       symlen - 1);
                 GOTO(failed, rc = -EPROTO);
         }
                       symlen - 1);
                 GOTO(failed, rc = -EPROTO);
         }
index effdd01..dfa3e55 100644 (file)
@@ -398,25 +398,25 @@ getxattr_nocache:
 
                /* only detect the xattr size */
                if (size == 0)
 
                /* only detect the xattr size */
                if (size == 0)
-                       GOTO(out, rc = body->eadatasize);
+                       GOTO(out, rc = body->mbo_eadatasize);
 
 
-               if (size < body->eadatasize) {
+               if (size < body->mbo_eadatasize) {
                        CERROR("server bug: replied size %u > %u\n",
                        CERROR("server bug: replied size %u > %u\n",
-                               body->eadatasize, (int)size);
+                               body->mbo_eadatasize, (int)size);
                        GOTO(out, rc = -ERANGE);
                }
 
                        GOTO(out, rc = -ERANGE);
                }
 
-               if (body->eadatasize == 0)
+               if (body->mbo_eadatasize == 0)
                        GOTO(out, rc = -ENODATA);
 
                /* do not need swab xattr data */
                xdata = req_capsule_server_sized_get(&req->rq_pill, &RMF_EADATA,
                        GOTO(out, rc = -ENODATA);
 
                /* do not need swab xattr data */
                xdata = req_capsule_server_sized_get(&req->rq_pill, &RMF_EADATA,
-                                                       body->eadatasize);
+                                                       body->mbo_eadatasize);
                if (!xdata)
                        GOTO(out, rc = -EFAULT);
 
                if (!xdata)
                        GOTO(out, rc = -EFAULT);
 
-               memcpy(buffer, xdata, body->eadatasize);
-               rc = body->eadatasize;
+               memcpy(buffer, xdata, body->mbo_eadatasize);
+               rc = body->mbo_eadatasize;
        }
 
 #ifdef CONFIG_FS_POSIX_ACL
        }
 
 #ifdef CONFIG_FS_POSIX_ACL
index b96a973..f961f98 100644 (file)
@@ -420,24 +420,25 @@ static int ll_xattr_cache_refill(struct inode *inode, struct lookup_intent *oit)
        }
        /* do not need swab xattr data */
        xdata = req_capsule_server_sized_get(&req->rq_pill, &RMF_EADATA,
        }
        /* do not need swab xattr data */
        xdata = req_capsule_server_sized_get(&req->rq_pill, &RMF_EADATA,
-                                               body->eadatasize);
+                                               body->mbo_eadatasize);
        xval = req_capsule_server_sized_get(&req->rq_pill, &RMF_EAVALS,
        xval = req_capsule_server_sized_get(&req->rq_pill, &RMF_EAVALS,
-                                               body->aclsize);
+                                               body->mbo_aclsize);
        xsizes = req_capsule_server_sized_get(&req->rq_pill, &RMF_EAVALS_LENS,
        xsizes = req_capsule_server_sized_get(&req->rq_pill, &RMF_EAVALS_LENS,
-                                             body->max_mdsize * sizeof(__u32));
+                                             body->mbo_max_mdsize *
+                                             sizeof(__u32));
        if (xdata == NULL || xval == NULL || xsizes == NULL) {
                CERROR("wrong setxattr reply\n");
                GOTO(out_destroy, rc = -EPROTO);
        }
 
        if (xdata == NULL || xval == NULL || xsizes == NULL) {
                CERROR("wrong setxattr reply\n");
                GOTO(out_destroy, rc = -EPROTO);
        }
 
-       xtail = xdata + body->eadatasize;
-       xvtail = xval + body->aclsize;
+       xtail = xdata + body->mbo_eadatasize;
+       xvtail = xval + body->mbo_aclsize;
 
        CDEBUG(D_CACHE, "caching: xdata=%p xtail=%p\n", xdata, xtail);
 
        ll_xattr_cache_init(lli);
 
 
        CDEBUG(D_CACHE, "caching: xdata=%p xtail=%p\n", xdata, xtail);
 
        ll_xattr_cache_init(lli);
 
-       for (i = 0; i < body->max_mdsize; i++) {
+       for (i = 0; i < body->mbo_max_mdsize; i++) {
                CDEBUG(D_CACHE, "caching [%s]=%.*s\n", xdata, *xsizes, xval);
                /* Perform consistency checks: attr names and vals in pill */
                if (memchr(xdata, 0, xtail - xdata) == NULL) {
                CDEBUG(D_CACHE, "caching [%s]=%.*s\n", xdata, *xsizes, xval);
                /* Perform consistency checks: attr names and vals in pill */
                if (memchr(xdata, 0, xtail - xdata) == NULL) {
index da76f8f..22a0d21 100644 (file)
@@ -80,7 +80,7 @@ static int lmv_intent_remote(struct obd_export *exp, struct lookup_intent *it,
        if (body == NULL)
                RETURN(-EPROTO);
 
        if (body == NULL)
                RETURN(-EPROTO);
 
-       LASSERT((body->valid & OBD_MD_MDS));
+       LASSERT((body->mbo_valid & OBD_MD_MDS));
 
        /*
         * Unfortunately, we have to lie to MDC/MDS to retrieve
 
        /*
         * Unfortunately, we have to lie to MDC/MDS to retrieve
@@ -99,9 +99,9 @@ static int lmv_intent_remote(struct obd_export *exp, struct lookup_intent *it,
                it->d.lustre.it_data = NULL;
        }
 
                it->d.lustre.it_data = NULL;
        }
 
-       LASSERT(fid_is_sane(&body->fid1));
+       LASSERT(fid_is_sane(&body->mbo_fid1));
 
 
-       tgt = lmv_find_target(lmv, &body->fid1);
+       tgt = lmv_find_target(lmv, &body->mbo_fid1);
        if (IS_ERR(tgt))
                GOTO(out, rc = PTR_ERR(tgt));
 
        if (IS_ERR(tgt))
                GOTO(out, rc = PTR_ERR(tgt));
 
@@ -109,7 +109,7 @@ static int lmv_intent_remote(struct obd_export *exp, struct lookup_intent *it,
        if (op_data == NULL)
                GOTO(out, rc = -ENOMEM);
 
        if (op_data == NULL)
                GOTO(out, rc = -ENOMEM);
 
-       op_data->op_fid1 = body->fid1;
+       op_data->op_fid1 = body->mbo_fid1;
        /* Sent the parent FID to the remote MDT */
        if (parent_fid != NULL) {
                /* The parent fid is only for remote open to
        /* Sent the parent FID to the remote MDT */
        if (parent_fid != NULL) {
                /* The parent fid is only for remote open to
@@ -119,12 +119,12 @@ static int lmv_intent_remote(struct obd_export *exp, struct lookup_intent *it,
                op_data->op_fid2 = *parent_fid;
                /* Add object FID to op_fid3, in case it needs to check stale
                 * (M_CHECK_STALE), see mdc_finish_intent_lock */
                op_data->op_fid2 = *parent_fid;
                /* Add object FID to op_fid3, in case it needs to check stale
                 * (M_CHECK_STALE), see mdc_finish_intent_lock */
-               op_data->op_fid3 = body->fid1;
+               op_data->op_fid3 = body->mbo_fid1;
        }
 
        op_data->op_bias = MDS_CROSS_REF;
        CDEBUG(D_INODE, "REMOTE_INTENT with fid="DFID" -> mds #%d\n",
        }
 
        op_data->op_bias = MDS_CROSS_REF;
        CDEBUG(D_INODE, "REMOTE_INTENT with fid="DFID" -> mds #%d\n",
-              PFID(&body->fid1), tgt->ltd_idx);
+              PFID(&body->mbo_fid1), tgt->ltd_idx);
 
        rc = md_intent_lock(tgt->ltd_exp, op_data, it, &req, cb_blocking,
                            extra_lock_flags);
 
        rc = md_intent_lock(tgt->ltd_exp, op_data, it, &req, cb_blocking,
                            extra_lock_flags);
@@ -234,10 +234,11 @@ int lmv_revalidate_slaves(struct obd_export *exp, struct mdt_body *mbody,
                        body = req_capsule_server_get(&req->rq_pill,
                                                      &RMF_MDT_BODY);
                        LASSERT(body != NULL);
                        body = req_capsule_server_get(&req->rq_pill,
                                                      &RMF_MDT_BODY);
                        LASSERT(body != NULL);
-                       if (unlikely(body->nlink < 2)) {
+                       if (unlikely(body->mbo_nlink < 2)) {
                                CERROR("%s: nlink %d < 2 corrupt stripe %d "DFID
                                CERROR("%s: nlink %d < 2 corrupt stripe %d "DFID
-                                      ":" DFID"\n", obd->obd_name, body->nlink,
-                                      i, PFID(&lsm->lsm_md_oinfo[i].lmo_fid),
+                                      ":" DFID"\n",
+                                      obd->obd_name, body->mbo_nlink, i,
+                                      PFID(&lsm->lsm_md_oinfo[i].lmo_fid),
                                       PFID(&lsm->lsm_md_oinfo[0].lmo_fid));
 
                                if (req != NULL)
                                       PFID(&lsm->lsm_md_oinfo[0].lmo_fid));
 
                                if (req != NULL)
@@ -253,11 +254,11 @@ int lmv_revalidate_slaves(struct obd_export *exp, struct mdt_body *mbody,
                        }
 
 
                        }
 
 
-                       i_size_write(inode, body->size);
-                       set_nlink(inode, body->nlink);
-                       LTIME_S(inode->i_atime) = body->atime;
-                       LTIME_S(inode->i_ctime) = body->ctime;
-                       LTIME_S(inode->i_mtime) = body->mtime;
+                       i_size_write(inode, body->mbo_size);
+                       set_nlink(inode, body->mbo_nlink);
+                       LTIME_S(inode->i_atime) = body->mbo_atime;
+                       LTIME_S(inode->i_ctime) = body->mbo_ctime;
+                       LTIME_S(inode->i_mtime) = body->mbo_mtime;
 
                        if (req != NULL)
                                ptlrpc_req_finished(req);
 
                        if (req != NULL)
                                ptlrpc_req_finished(req);
@@ -299,9 +300,9 @@ int lmv_revalidate_slaves(struct obd_export *exp, struct mdt_body *mbody,
               atime, ctime, mtime, PFID(&lsm->lsm_md_oinfo[0].lmo_fid));
 
        if (mbody != NULL) {
               atime, ctime, mtime, PFID(&lsm->lsm_md_oinfo[0].lmo_fid));
 
        if (mbody != NULL) {
-               mbody->atime = atime;
-               mbody->ctime = ctime;
-               mbody->mtime = mtime;
+               mbody->mbo_atime = atime;
+               mbody->mbo_ctime = ctime;
+               mbody->mbo_mtime = mtime;
        }
 cleanup:
        OBD_FREE_PTR(op_data);
        }
 cleanup:
        OBD_FREE_PTR(op_data);
@@ -396,7 +397,7 @@ int lmv_intent_open(struct obd_export *exp, struct md_op_data *op_data,
                RETURN(-EPROTO);
 
        /* Not cross-ref case, just get out of here. */
                RETURN(-EPROTO);
 
        /* Not cross-ref case, just get out of here. */
-       if (unlikely((body->valid & OBD_MD_MDS))) {
+       if (unlikely((body->mbo_valid & OBD_MD_MDS))) {
                rc = lmv_intent_remote(exp, it, &op_data->op_fid1, reqp,
                                       cb_blocking, extra_lock_flags);
                if (rc != 0)
                rc = lmv_intent_remote(exp, it, &op_data->op_fid1, reqp,
                                       cb_blocking, extra_lock_flags);
                if (rc != 0)
@@ -488,7 +489,7 @@ lmv_intent_lookup(struct obd_export *exp, struct md_op_data *op_data,
                RETURN(-EPROTO);
 
        /* Not cross-ref case, just get out of here. */
                RETURN(-EPROTO);
 
        /* Not cross-ref case, just get out of here. */
-       if (unlikely((body->valid & OBD_MD_MDS))) {
+       if (unlikely((body->mbo_valid & OBD_MD_MDS))) {
                rc = lmv_intent_remote(exp, it, NULL, reqp, cb_blocking,
                                       extra_lock_flags);
                if (rc != 0)
                rc = lmv_intent_remote(exp, it, NULL, reqp, cb_blocking,
                                       extra_lock_flags);
                if (rc != 0)
index 105d8b2..8750215 100644 (file)
@@ -1950,8 +1950,8 @@ lmv_getattr_name(struct obd_export *exp,struct md_op_data *op_data,
        body = req_capsule_server_get(&(*preq)->rq_pill, &RMF_MDT_BODY);
        LASSERT(body != NULL);
 
        body = req_capsule_server_get(&(*preq)->rq_pill, &RMF_MDT_BODY);
        LASSERT(body != NULL);
 
-       if (body->valid & OBD_MD_MDS) {
-               struct lu_fid rid = body->fid1;
+       if (body->mbo_valid & OBD_MD_MDS) {
+               struct lu_fid rid = body->mbo_fid1;
                CDEBUG(D_INODE, "Request attrs for "DFID"\n",
                       PFID(&rid));
 
                CDEBUG(D_INODE, "Request attrs for "DFID"\n",
                       PFID(&rid));
 
@@ -2641,11 +2641,11 @@ retry:
                RETURN(-EPROTO);
 
        /* Not cross-ref case, just get out of here. */
                RETURN(-EPROTO);
 
        /* Not cross-ref case, just get out of here. */
-       if (likely(!(body->valid & OBD_MD_MDS)))
+       if (likely(!(body->mbo_valid & OBD_MD_MDS)))
                RETURN(0);
 
        CDEBUG(D_INODE, "%s: try unlink to another MDT for "DFID"\n",
                RETURN(0);
 
        CDEBUG(D_INODE, "%s: try unlink to another MDT for "DFID"\n",
-              exp->exp_obd->obd_name, PFID(&body->fid1));
+              exp->exp_obd->obd_name, PFID(&body->mbo_fid1));
 
        /* This is a remote object, try remote MDT, Note: it may
         * try more than 1 time here, Considering following case
 
        /* This is a remote object, try remote MDT, Note: it may
         * try more than 1 time here, Considering following case
@@ -2666,7 +2666,7 @@ retry:
         *
         * In theory, it might try unlimited time here, but it should
         * be very rare case.  */
         *
         * In theory, it might try unlimited time here, but it should
         * be very rare case.  */
-       op_data->op_fid2 = body->fid1;
+       op_data->op_fid2 = body->mbo_fid1;
        ptlrpc_req_finished(*request);
        *request = NULL;
 
        ptlrpc_req_finished(*request);
        *request = NULL;
 
index 48e1b7f..b2d2a53 100644 (file)
@@ -58,12 +58,12 @@ static void __mdc_pack_body(struct mdt_body *b, __u32 suppgid)
 {
        LASSERT (b != NULL);
 
 {
        LASSERT (b != NULL);
 
-       b->suppgid = suppgid;
-       b->uid = from_kuid(&init_user_ns, current_uid());
-       b->gid = from_kgid(&init_user_ns, current_gid());
-       b->fsuid = from_kuid(&init_user_ns, current_fsuid());
-       b->fsgid = from_kgid(&init_user_ns, current_fsgid());
-       b->capability = cfs_curproc_cap_pack();
+       b->mbo_suppgid = suppgid;
+       b->mbo_uid = from_kuid(&init_user_ns, current_uid());
+       b->mbo_gid = from_kgid(&init_user_ns, current_gid());
+       b->mbo_fsuid = from_kuid(&init_user_ns, current_fsuid());
+       b->mbo_fsgid = from_kgid(&init_user_ns, current_fsgid());
+       b->mbo_capability = cfs_curproc_cap_pack();
 }
 
 void mdc_pack_capa(struct ptlrpc_request *req, const struct req_msg_field *field,
 }
 
 void mdc_pack_capa(struct ptlrpc_request *req, const struct req_msg_field *field,
@@ -90,30 +90,30 @@ void mdc_swap_layouts_pack(struct ptlrpc_request *req,
                                                    &RMF_MDT_BODY);
 
        __mdc_pack_body(b, op_data->op_suppgids[0]);
                                                    &RMF_MDT_BODY);
 
        __mdc_pack_body(b, op_data->op_suppgids[0]);
-       b->fid1 = op_data->op_fid1;
-       b->fid2 = op_data->op_fid2;
-       b->valid |= OBD_MD_FLID;
+       b->mbo_fid1 = op_data->op_fid1;
+       b->mbo_fid2 = op_data->op_fid2;
+       b->mbo_valid |= OBD_MD_FLID;
 
        mdc_pack_capa(req, &RMF_CAPA1, op_data->op_capa1);
        mdc_pack_capa(req, &RMF_CAPA2, op_data->op_capa2);
 }
 
 void mdc_pack_body(struct ptlrpc_request *req,
 
        mdc_pack_capa(req, &RMF_CAPA1, op_data->op_capa1);
        mdc_pack_capa(req, &RMF_CAPA2, op_data->op_capa2);
 }
 
 void mdc_pack_body(struct ptlrpc_request *req,
-                   const struct lu_fid *fid, struct obd_capa *oc,
-                   __u64 valid, int ea_size, __u32 suppgid, int flags)
+                  const struct lu_fid *fid, struct obd_capa *oc,
+                  __u64 valid, int ea_size, __u32 suppgid, int flags)
 {
 {
-        struct mdt_body *b = req_capsule_client_get(&req->rq_pill,
-                                                    &RMF_MDT_BODY);
-        LASSERT(b != NULL);
-        b->valid = valid;
-        b->eadatasize = ea_size;
-        b->flags = flags;
-        __mdc_pack_body(b, suppgid);
-        if (fid) {
-                b->fid1 = *fid;
-                b->valid |= OBD_MD_FLID;
-                mdc_pack_capa(req, &RMF_CAPA1, oc);
-        }
+       struct mdt_body *b = req_capsule_client_get(&req->rq_pill,
+                                                   &RMF_MDT_BODY);
+       LASSERT(b != NULL);
+       b->mbo_valid = valid;
+       b->mbo_eadatasize = ea_size;
+       b->mbo_flags = flags;
+       __mdc_pack_body(b, suppgid);
+       if (fid) {
+               b->mbo_fid1 = *fid;
+               b->mbo_valid |= OBD_MD_FLID;
+               mdc_pack_capa(req, &RMF_CAPA1, oc);
+       }
 }
 
 /**
 }
 
 /**
@@ -153,14 +153,14 @@ void mdc_readdir_pack(struct ptlrpc_request *req, __u64 pgoff,
 {
         struct mdt_body *b = req_capsule_client_get(&req->rq_pill,
                                                     &RMF_MDT_BODY);
 {
         struct mdt_body *b = req_capsule_client_get(&req->rq_pill,
                                                     &RMF_MDT_BODY);
-        b->fid1 = *fid;
-        b->valid |= OBD_MD_FLID;
-        b->size = pgoff;                       /* !! */
-        b->nlink = size;                        /* !! */
-        __mdc_pack_body(b, -1);
-        b->mode = LUDA_FID | LUDA_TYPE;
-
-        mdc_pack_capa(req, &RMF_CAPA1, oc);
+       b->mbo_fid1 = *fid;
+       b->mbo_valid |= OBD_MD_FLID;
+       b->mbo_size = pgoff;                   /* !! */
+       b->mbo_nlink = size;                    /* !! */
+       __mdc_pack_body(b, -1);
+       b->mbo_mode = LUDA_FID | LUDA_TYPE;
+
+       mdc_pack_capa(req, &RMF_CAPA1, oc);
 }
 
 /* packing of MDS records */
 }
 
 /* packing of MDS records */
@@ -496,18 +496,18 @@ void mdc_getattr_pack(struct ptlrpc_request *req, __u64 valid, int flags,
         struct mdt_body *b = req_capsule_client_get(&req->rq_pill,
                                                     &RMF_MDT_BODY);
 
         struct mdt_body *b = req_capsule_client_get(&req->rq_pill,
                                                     &RMF_MDT_BODY);
 
-        b->valid = valid;
-        if (op_data->op_bias & MDS_CHECK_SPLIT)
-                b->valid |= OBD_MD_FLCKSPLIT;
-        if (op_data->op_bias & MDS_CROSS_REF)
-                b->valid |= OBD_MD_FLCROSSREF;
-        b->eadatasize = ea_size;
-        b->flags = flags;
-        __mdc_pack_body(b, op_data->op_suppgids[0]);
-
-        b->fid1 = op_data->op_fid1;
-        b->fid2 = op_data->op_fid2;
-        b->valid |= OBD_MD_FLID;
+       b->mbo_valid = valid;
+       if (op_data->op_bias & MDS_CHECK_SPLIT)
+               b->mbo_valid |= OBD_MD_FLCKSPLIT;
+       if (op_data->op_bias & MDS_CROSS_REF)
+               b->mbo_valid |= OBD_MD_FLCROSSREF;
+       b->mbo_eadatasize = ea_size;
+       b->mbo_flags = flags;
+       __mdc_pack_body(b, op_data->op_suppgids[0]);
+
+       b->mbo_fid1 = op_data->op_fid1;
+       b->mbo_fid2 = op_data->op_fid2;
+       b->mbo_valid |= OBD_MD_FLID;
 
         mdc_pack_capa(req, &RMF_CAPA1, op_data->op_capa1);
 
 
         mdc_pack_capa(req, &RMF_CAPA1, op_data->op_capa1);
 
index fecf49a..da658b5 100644 (file)
@@ -248,19 +248,19 @@ static inline void mdc_clear_replay_flag(struct ptlrpc_request *req, int rc)
  * but this is incredibly unlikely, and questionable whether the client
  * could do MDS recovery under OOM anyways... */
 static void mdc_realloc_openmsg(struct ptlrpc_request *req,
  * but this is incredibly unlikely, and questionable whether the client
  * could do MDS recovery under OOM anyways... */
 static void mdc_realloc_openmsg(struct ptlrpc_request *req,
-                                struct mdt_body *body)
+                               struct mdt_body *body)
 {
 {
-        int     rc;
+       int     rc;
 
 
-        /* FIXME: remove this explicit offset. */
-        rc = sptlrpc_cli_enlarge_reqbuf(req, DLM_INTENT_REC_OFF + 4,
-                                        body->eadatasize);
-        if (rc) {
-                CERROR("Can't enlarge segment %d size to %d\n",
-                       DLM_INTENT_REC_OFF + 4, body->eadatasize);
-                body->valid &= ~OBD_MD_FLEASIZE;
-                body->eadatasize = 0;
-        }
+       /* FIXME: remove this explicit offset. */
+       rc = sptlrpc_cli_enlarge_reqbuf(req, DLM_INTENT_REC_OFF + 4,
+                                       body->mbo_eadatasize);
+       if (rc) {
+               CERROR("Can't enlarge segment %d size to %d\n",
+                      DLM_INTENT_REC_OFF + 4, body->mbo_eadatasize);
+               body->mbo_valid &= ~OBD_MD_FLEASIZE;
+               body->mbo_eadatasize = 0;
+       }
 }
 
 static struct ptlrpc_request *
 }
 
 static struct ptlrpc_request *
@@ -651,7 +651,7 @@ static int mdc_finish_enqueue(struct obd_export *exp,
                        mdc_set_open_replay_data(NULL, NULL, it);
                }
 
                        mdc_set_open_replay_data(NULL, NULL, it);
                }
 
-                if ((body->valid & (OBD_MD_FLDIREA | OBD_MD_FLEASIZE)) != 0) {
+               if (body->mbo_valid & (OBD_MD_FLDIREA | OBD_MD_FLEASIZE)) {
                         void *eadata;
 
                        mdc_update_max_ea_from_body(exp, body);
                         void *eadata;
 
                        mdc_update_max_ea_from_body(exp, body);
@@ -661,14 +661,14 @@ static int mdc_finish_enqueue(struct obd_export *exp,
                          * Eventually, obd_unpackmd() will check the contents.
                          */
                         eadata = req_capsule_server_sized_get(pill, &RMF_MDT_MD,
                          * Eventually, obd_unpackmd() will check the contents.
                          */
                         eadata = req_capsule_server_sized_get(pill, &RMF_MDT_MD,
-                                                              body->eadatasize);
-                        if (eadata == NULL)
-                                RETURN(-EPROTO);
+                                                       body->mbo_eadatasize);
+                       if (eadata == NULL)
+                               RETURN(-EPROTO);
 
                        /* save lvb data and length in case this is for layout
                         * lock */
                        lvb_data = eadata;
 
                        /* save lvb data and length in case this is for layout
                         * lock */
                        lvb_data = eadata;
-                       lvb_len = body->eadatasize;
+                       lvb_len = body->mbo_eadatasize;
 
                         /*
                          * We save the reply LOV EA in case we have to replay a
 
                         /*
                          * We save the reply LOV EA in case we have to replay a
@@ -683,24 +683,25 @@ static int mdc_finish_enqueue(struct obd_export *exp,
                                 void *lmm;
                                 if (req_capsule_get_size(pill, &RMF_EADATA,
                                                          RCL_CLIENT) <
                                 void *lmm;
                                 if (req_capsule_get_size(pill, &RMF_EADATA,
                                                          RCL_CLIENT) <
-                                    body->eadatasize)
-                                        mdc_realloc_openmsg(req, body);
-                                else
-                                        req_capsule_shrink(pill, &RMF_EADATA,
-                                                           body->eadatasize,
-                                                           RCL_CLIENT);
-
-                                req_capsule_set_size(pill, &RMF_EADATA,
-                                                     RCL_CLIENT,
-                                                     body->eadatasize);
-
-                                lmm = req_capsule_client_get(pill, &RMF_EADATA);
-                                if (lmm)
-                                        memcpy(lmm, eadata, body->eadatasize);
-                        }
-                }
+                                   body->mbo_eadatasize)
+                                       mdc_realloc_openmsg(req, body);
+                               else
+                                       req_capsule_shrink(pill, &RMF_EADATA,
+                                                          body->mbo_eadatasize,
+                                                          RCL_CLIENT);
+
+                               req_capsule_set_size(pill, &RMF_EADATA,
+                                                    RCL_CLIENT,
+                                                    body->mbo_eadatasize);
+
+                               lmm = req_capsule_client_get(pill, &RMF_EADATA);
+                               if (lmm)
+                                       memcpy(lmm, eadata,
+                                              body->mbo_eadatasize);
+                       }
+               }
 
 
-                if (body->valid & OBD_MD_FLRMTPERM) {
+               if (body->mbo_valid & OBD_MD_FLRMTPERM) {
                         struct mdt_remote_perm *perm;
 
                         LASSERT(client_is_remote(exp));
                         struct mdt_remote_perm *perm;
 
                         LASSERT(client_is_remote(exp));
@@ -709,7 +710,7 @@ static int mdc_finish_enqueue(struct obd_export *exp,
                         if (perm == NULL)
                                 RETURN(-EPROTO);
                 }
                         if (perm == NULL)
                                 RETURN(-EPROTO);
                 }
-                if (body->valid & OBD_MD_FLMDSCAPA) {
+               if (body->mbo_valid & OBD_MD_FLMDSCAPA) {
                         struct lustre_capa *capa, *p;
 
                         capa = req_capsule_server_get(pill, &RMF_CAPA1);
                         struct lustre_capa *capa, *p;
 
                         capa = req_capsule_server_get(pill, &RMF_CAPA1);
@@ -723,7 +724,7 @@ static int mdc_finish_enqueue(struct obd_export *exp,
                                 *p = *capa;
                         }
                 }
                                 *p = *capa;
                         }
                 }
-                if (body->valid & OBD_MD_FLOSSCAPA) {
+               if (body->mbo_valid & OBD_MD_FLOSSCAPA) {
                         struct lustre_capa *capa;
 
                         capa = req_capsule_server_get(pill, &RMF_CAPA2);
                         struct lustre_capa *capa;
 
                         capa = req_capsule_server_get(pill, &RMF_CAPA2);
@@ -985,11 +986,12 @@ static int mdc_finish_intent_lock(struct obd_export *exp,
                  * op_fid2 - new allocated fid - if file is created.
                  * op_fid3 - existent fid - if file only open.
                  * op_fid3 is saved in lmv_intent_open */
                  * op_fid2 - new allocated fid - if file is created.
                  * op_fid3 - existent fid - if file only open.
                  * op_fid3 is saved in lmv_intent_open */
-                if ((!lu_fid_eq(&op_data->op_fid2, &mdt_body->fid1)) &&
-                    (!lu_fid_eq(&op_data->op_fid3, &mdt_body->fid1))) {
-                        CDEBUG(D_DENTRY, "Found stale data "DFID"("DFID")/"DFID
-                               "\n", PFID(&op_data->op_fid2),
-                               PFID(&op_data->op_fid2), PFID(&mdt_body->fid1));
+               if ((!lu_fid_eq(&op_data->op_fid2, &mdt_body->mbo_fid1)) &&
+                   (!lu_fid_eq(&op_data->op_fid3, &mdt_body->mbo_fid1))) {
+                       CDEBUG(D_DENTRY, "Found stale data "DFID"("DFID")/"DFID
+                              "\n", PFID(&op_data->op_fid2),
+                              PFID(&op_data->op_fid2),
+                              PFID(&mdt_body->mbo_fid1));
                         RETURN(-ESTALE);
                 }
         }
                         RETURN(-ESTALE);
                 }
         }
@@ -1034,10 +1036,10 @@ static int mdc_finish_intent_lock(struct obd_export *exp,
                 ldlm_policy_data_t policy = lock->l_policy_data;
                 LDLM_DEBUG(lock, "matching against this");
 
                 ldlm_policy_data_t policy = lock->l_policy_data;
                 LDLM_DEBUG(lock, "matching against this");
 
-               LASSERTF(fid_res_name_eq(&mdt_body->fid1,
+               LASSERTF(fid_res_name_eq(&mdt_body->mbo_fid1,
                                         &lock->l_resource->lr_name),
                         "Lock res_id: "DLDLMRES", fid: "DFID"\n",
                                         &lock->l_resource->lr_name),
                         "Lock res_id: "DLDLMRES", fid: "DFID"\n",
-                        PLDLMRES(lock->l_resource), PFID(&mdt_body->fid1));
+                        PLDLMRES(lock->l_resource), PFID(&mdt_body->mbo_fid1));
                LDLM_LOCK_PUT(lock);
 
                 memcpy(&old_lock, lockh, sizeof(*lockh));
                LDLM_LOCK_PUT(lock);
 
                 memcpy(&old_lock, lockh, sizeof(*lockh));
index 112b53b..6fb475d 100644 (file)
@@ -193,8 +193,8 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data,
                 body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
                 LASSERT(epoch != NULL);
                 LASSERT(body != NULL);
                 body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
                 LASSERT(epoch != NULL);
                 LASSERT(body != NULL);
-                epoch->handle = body->handle;
-                epoch->ioepoch = body->ioepoch;
+               epoch->handle = body->mbo_handle;
+               epoch->ioepoch = body->mbo_ioepoch;
                 req->rq_replay_cb = mdc_replay_open;
         /** bug 3633, open may be committed and estale answer is not error */
         } else if (rc == -ESTALE && (op_data->op_flags & MF_SOM_CHANGE)) {
                 req->rq_replay_cb = mdc_replay_open;
         /** bug 3633, open may be committed and estale answer is not error */
         } else if (rc == -ESTALE && (op_data->op_flags & MF_SOM_CHANGE)) {
@@ -310,7 +310,7 @@ rebuild:
 
                 body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
                 LASSERT(body);
 
                 body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
                 LASSERT(body);
-                if (body->valid & OBD_MD_FLMDSCAPA) {
+               if (body->mbo_valid & OBD_MD_FLMDSCAPA) {
                         capa = req_capsule_server_get(&req->rq_pill,
                                                       &RMF_CAPA1);
                         if (capa == NULL)
                         capa = req_capsule_server_get(&req->rq_pill,
                                                       &RMF_CAPA1);
                         if (capa == NULL)
index fddf7ae..135a55e 100644 (file)
@@ -138,17 +138,15 @@ static int send_getstatus(struct obd_import *imp, struct lu_fid *rootfid,
         if (body == NULL)
                 GOTO(out, rc = -EPROTO);
 
         if (body == NULL)
                 GOTO(out, rc = -EPROTO);
 
-        if (body->valid & OBD_MD_FLMDSCAPA) {
-                rc = mdc_unpack_capa(NULL, req, &RMF_CAPA1, pc);
-                if (rc)
-                        GOTO(out, rc);
-        }
+       if (body->mbo_valid & OBD_MD_FLMDSCAPA) {
+               rc = mdc_unpack_capa(NULL, req, &RMF_CAPA1, pc);
+               if (rc)
+                       GOTO(out, rc);
+       }
 
 
-        *rootfid = body->fid1;
-        CDEBUG(D_NET,
-               "root fid="DFID", last_committed="LPU64"\n",
-               PFID(rootfid),
-               lustre_msg_get_last_committed(req->rq_repmsg));
+       *rootfid = body->mbo_fid1;
+       CDEBUG(D_NET, "root fid="DFID", last_committed="LPU64"\n",
+              PFID(rootfid), lustre_msg_get_last_committed(req->rq_repmsg));
         EXIT;
 out:
         ptlrpc_req_finished(req);
         EXIT;
 out:
         ptlrpc_req_finished(req);
@@ -192,17 +190,17 @@ static int mdc_getattr_common(struct obd_export *exp,
         if (body == NULL)
                 RETURN(-EPROTO);
 
         if (body == NULL)
                 RETURN(-EPROTO);
 
-        CDEBUG(D_NET, "mode: %o\n", body->mode);
+       CDEBUG(D_NET, "mode: %o\n", body->mbo_mode);
 
        mdc_update_max_ea_from_body(exp, body);
 
        mdc_update_max_ea_from_body(exp, body);
-       if (body->eadatasize != 0) {
+       if (body->mbo_eadatasize != 0) {
                eadata = req_capsule_server_sized_get(pill, &RMF_MDT_MD,
                eadata = req_capsule_server_sized_get(pill, &RMF_MDT_MD,
-                                                     body->eadatasize);
+                                                     body->mbo_eadatasize);
                if (eadata == NULL)
                        RETURN(-EPROTO);
        }
 
                if (eadata == NULL)
                        RETURN(-EPROTO);
        }
 
-        if (body->valid & OBD_MD_FLRMTPERM) {
+       if (body->mbo_valid & OBD_MD_FLRMTPERM) {
                 struct mdt_remote_perm *perm;
 
                 LASSERT(client_is_remote(exp));
                 struct mdt_remote_perm *perm;
 
                 LASSERT(client_is_remote(exp));
@@ -212,7 +210,7 @@ static int mdc_getattr_common(struct obd_export *exp,
                         RETURN(-EPROTO);
         }
 
                         RETURN(-EPROTO);
         }
 
-        if (body->valid & OBD_MD_FLMDSCAPA) {
+       if (body->mbo_valid & OBD_MD_FLMDSCAPA) {
                 struct lustre_capa *capa;
                 capa = req_capsule_server_get(pill, &RMF_CAPA1);
                 if (capa == NULL)
                 struct lustre_capa *capa;
                 capa = req_capsule_server_get(pill, &RMF_CAPA1);
                 if (capa == NULL)
@@ -456,15 +454,15 @@ static int mdc_unpack_acl(struct ptlrpc_request *req, struct lustre_md *md)
         int                     rc;
         ENTRY;
 
         int                     rc;
         ENTRY;
 
-        if (!body->aclsize)
-                RETURN(0);
+       if (!body->mbo_aclsize)
+               RETURN(0);
 
 
-        buf = req_capsule_server_sized_get(pill, &RMF_ACL, body->aclsize);
+       buf = req_capsule_server_sized_get(pill, &RMF_ACL, body->mbo_aclsize);
 
 
-        if (!buf)
-                RETURN(-EPROTO);
+       if (!buf)
+               RETURN(-EPROTO);
 
 
-        acl = posix_acl_from_xattr(&init_user_ns, buf, body->aclsize);
+       acl = posix_acl_from_xattr(&init_user_ns, buf, body->mbo_aclsize);
         if (IS_ERR(acl)) {
                 rc = PTR_ERR(acl);
                 CERROR("convert xattr to acl: %d\n", rc);
         if (IS_ERR(acl)) {
                 rc = PTR_ERR(acl);
                 CERROR("convert xattr to acl: %d\n", rc);
@@ -499,22 +497,23 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
         md->body = req_capsule_server_get(pill, &RMF_MDT_BODY);
         LASSERT(md->body != NULL);
 
         md->body = req_capsule_server_get(pill, &RMF_MDT_BODY);
         LASSERT(md->body != NULL);
 
-        if (md->body->valid & OBD_MD_FLEASIZE) {
-                int lmmsize;
-                struct lov_mds_md *lmm;
+       if (md->body->mbo_valid & OBD_MD_FLEASIZE) {
+               int lmmsize;
+               struct lov_mds_md *lmm;
 
 
-                if (!S_ISREG(md->body->mode)) {
-                        CDEBUG(D_INFO, "OBD_MD_FLEASIZE set, should be a "
-                               "regular file, but is not\n");
-                        GOTO(out, rc = -EPROTO);
-                }
+               if (!S_ISREG(md->body->mbo_mode)) {
+                       CDEBUG(D_INFO, "OBD_MD_FLEASIZE set, should be a "
+                              "regular file, but is not\n");
+                       GOTO(out, rc = -EPROTO);
+               }
 
 
-                if (md->body->eadatasize == 0) {
-                        CDEBUG(D_INFO, "OBD_MD_FLEASIZE set, "
-                               "but eadatasize 0\n");
-                        GOTO(out, rc = -EPROTO);
-                }
-                lmmsize = md->body->eadatasize;
+               if (md->body->mbo_eadatasize == 0) {
+                       CDEBUG(D_INFO, "OBD_MD_FLEASIZE set, "
+                              "but eadatasize 0\n");
+                       GOTO(out, rc = -EPROTO);
+               }
+
+               lmmsize = md->body->mbo_eadatasize;
                 lmm = req_capsule_server_sized_get(pill, &RMF_MDT_MD, lmmsize);
                 if (!lmm)
                         GOTO(out, rc = -EPROTO);
                 lmm = req_capsule_server_sized_get(pill, &RMF_MDT_MD, lmmsize);
                 if (!lmm)
                         GOTO(out, rc = -EPROTO);
@@ -530,23 +529,24 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
                         GOTO(out, rc = -EPROTO);
                 }
 
                         GOTO(out, rc = -EPROTO);
                 }
 
-        } else if (md->body->valid & OBD_MD_FLDIREA) {
-                int lmvsize;
-                struct lov_mds_md *lmv;
+       } else if (md->body->mbo_valid & OBD_MD_FLDIREA) {
+               int lmvsize;
+               struct lov_mds_md *lmv;
 
 
-                if(!S_ISDIR(md->body->mode)) {
-                        CDEBUG(D_INFO, "OBD_MD_FLDIREA set, should be a "
-                               "directory, but is not\n");
-                        GOTO(out, rc = -EPROTO);
-                }
+               if (!S_ISDIR(md->body->mbo_mode)) {
+                       CDEBUG(D_INFO, "OBD_MD_FLDIREA set, should be a "
+                              "directory, but is not\n");
+                       GOTO(out, rc = -EPROTO);
+               }
 
 
-                if (md->body->eadatasize == 0) {
-                        CDEBUG(D_INFO, "OBD_MD_FLDIREA is set, "
-                               "but eadatasize 0\n");
-                        RETURN(-EPROTO);
-                }
-               if (md->body->valid & OBD_MD_MEA) {
-                       lmvsize = md->body->eadatasize;
+               if (md->body->mbo_eadatasize == 0) {
+                       CDEBUG(D_INFO, "OBD_MD_FLDIREA is set, "
+                              "but eadatasize 0\n");
+                       RETURN(-EPROTO);
+               }
+
+               if (md->body->mbo_valid & OBD_MD_MEA) {
+                       lmvsize = md->body->mbo_eadatasize;
                        lmv = req_capsule_server_sized_get(pill, &RMF_MDT_MD,
                                                           lmvsize);
                        if (!lmv)
                        lmv = req_capsule_server_sized_get(pill, &RMF_MDT_MD,
                                                           lmvsize);
                        if (!lmv)
@@ -567,20 +567,19 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
         }
         rc = 0;
 
         }
         rc = 0;
 
-        if (md->body->valid & OBD_MD_FLRMTPERM) {
-                /* remote permission */
-                LASSERT(client_is_remote(exp));
-                md->remote_perm = req_capsule_server_swab_get(pill, &RMF_ACL,
-                                                lustre_swab_mdt_remote_perm);
-                if (!md->remote_perm)
-                        GOTO(out, rc = -EPROTO);
-        }
-        else if (md->body->valid & OBD_MD_FLACL) {
-                /* for ACL, it's possible that FLACL is set but aclsize is zero.
-                 * only when aclsize != 0 there's an actual segment for ACL
-                 * in reply buffer.
-                 */
-                if (md->body->aclsize) {
+       if (md->body->mbo_valid & OBD_MD_FLRMTPERM) {
+               /* remote permission */
+               LASSERT(client_is_remote(exp));
+               md->remote_perm = req_capsule_server_swab_get(pill, &RMF_ACL,
+                                               lustre_swab_mdt_remote_perm);
+               if (!md->remote_perm)
+                       GOTO(out, rc = -EPROTO);
+       } else if (md->body->mbo_valid & OBD_MD_FLACL) {
+               /* for ACL, it's possible that FLACL is set but aclsize is zero.
+                * only when aclsize != 0 there's an actual segment for ACL
+                * in reply buffer.
+                */
+               if (md->body->mbo_aclsize) {
                         rc = mdc_unpack_acl(req, md);
                         if (rc)
                                 GOTO(out, rc);
                         rc = mdc_unpack_acl(req, md);
                         if (rc)
                                 GOTO(out, rc);
@@ -590,7 +589,7 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
 #endif
                 }
         }
 #endif
                 }
         }
-        if (md->body->valid & OBD_MD_FLMDSCAPA) {
+       if (md->body->mbo_valid & OBD_MD_FLMDSCAPA) {
                 struct obd_capa *oc = NULL;
 
                 rc = mdc_unpack_capa(NULL, req, &RMF_CAPA1, &oc);
                 struct obd_capa *oc = NULL;
 
                 rc = mdc_unpack_capa(NULL, req, &RMF_CAPA1, &oc);
@@ -599,7 +598,7 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
                 md->mds_capa = oc;
         }
 
                 md->mds_capa = oc;
         }
 
-        if (md->body->valid & OBD_MD_FLOSSCAPA) {
+       if (md->body->mbo_valid & OBD_MD_FLOSSCAPA) {
                 struct obd_capa *oc = NULL;
 
                 rc = mdc_unpack_capa(NULL, req, &RMF_CAPA2, &oc);
                 struct obd_capa *oc = NULL;
 
                 rc = mdc_unpack_capa(NULL, req, &RMF_CAPA2, &oc);
@@ -664,10 +663,10 @@ void mdc_replay_open(struct ptlrpc_request *req)
                 LASSERT(och->och_magic == OBD_CLIENT_HANDLE_MAGIC);
 
                 file_fh = &och->och_fh;
                 LASSERT(och->och_magic == OBD_CLIENT_HANDLE_MAGIC);
 
                 file_fh = &och->och_fh;
-                CDEBUG(D_HA, "updating handle from "LPX64" to "LPX64"\n",
-                       file_fh->cookie, body->handle.cookie);
-                old = *file_fh;
-                *file_fh = body->handle;
+               CDEBUG(D_HA, "updating handle from "LPX64" to "LPX64"\n",
+                      file_fh->cookie, body->mbo_handle.cookie);
+               old = *file_fh;
+               *file_fh = body->mbo_handle;
         }
         close_req = mod->mod_close_req;
         if (close_req != NULL) {
         }
         close_req = mod->mod_close_req;
         if (close_req != NULL) {
@@ -682,7 +681,7 @@ void mdc_replay_open(struct ptlrpc_request *req)
                 if (och != NULL)
                         LASSERT(!memcmp(&old, &epoch->handle, sizeof(old)));
                 DEBUG_REQ(D_HA, close_req, "updating close body with new fh");
                 if (och != NULL)
                         LASSERT(!memcmp(&old, &epoch->handle, sizeof(old)));
                 DEBUG_REQ(D_HA, close_req, "updating close body with new fh");
-                epoch->handle = body->handle;
+               epoch->handle = body->mbo_handle;
         }
         EXIT;
 }
         }
         EXIT;
 }
@@ -765,11 +764,11 @@ int mdc_set_open_replay_data(struct obd_export *exp,
                spin_unlock(&open_req->rq_lock);
         }
 
                spin_unlock(&open_req->rq_lock);
         }
 
-        rec->cr_fid2 = body->fid1;
-        rec->cr_ioepoch = body->ioepoch;
-        rec->cr_old_handle.cookie = body->handle.cookie;
-        open_req->rq_replay_cb = mdc_replay_open;
-        if (!fid_is_sane(&body->fid1)) {
+       rec->cr_fid2 = body->mbo_fid1;
+       rec->cr_ioepoch = body->mbo_ioepoch;
+       rec->cr_old_handle.cookie = body->mbo_handle.cookie;
+       open_req->rq_replay_cb = mdc_replay_open;
+       if (!fid_is_sane(&body->mbo_fid1)) {
                 DEBUG_REQ(D_ERROR, open_req, "Saving replay request with "
                           "insane fid");
                 LBUG();
                 DEBUG_REQ(D_ERROR, open_req, "Saving replay request with "
                           "insane fid");
                 LBUG();
@@ -831,7 +830,7 @@ static void mdc_close_handle_reply(struct ptlrpc_request *req,
                 epoch = req_capsule_client_get(&req->rq_pill, &RMF_MDT_EPOCH);
 
                 epoch->flags |= MF_SOM_AU;
                 epoch = req_capsule_client_get(&req->rq_pill, &RMF_MDT_EPOCH);
 
                 epoch->flags |= MF_SOM_AU;
-                if (repbody->valid & OBD_MD_FLGETATTRLOCK)
+               if (repbody->mbo_valid & OBD_MD_FLGETATTRLOCK)
                         op_data->op_flags |= MF_GETATTR_LOCK;
         }
 }
                         op_data->op_flags |= MF_GETATTR_LOCK;
         }
 }
@@ -3238,7 +3237,7 @@ static int mdc_interpret_renew_capa(const struct lu_env *env,
         if (body == NULL)
                 GOTO(out, capa = ERR_PTR(-EFAULT));
 
         if (body == NULL)
                 GOTO(out, capa = ERR_PTR(-EFAULT));
 
-        if ((body->valid & OBD_MD_FLOSSCAPA) == 0)
+       if ((body->mbo_valid & OBD_MD_FLOSSCAPA) == 0)
                 GOTO(out, capa = ERR_PTR(-ENOENT));
 
         capa = req_capsule_server_get(&req->rq_pill, &RMF_CAPA2);
                 GOTO(out, capa = ERR_PTR(-ENOENT));
 
         capa = req_capsule_server_get(&req->rq_pill, &RMF_CAPA2);
index 86db768..d01af8b 100644 (file)
@@ -280,15 +280,15 @@ static int mdt_getstatus(struct tgt_session_info *tsi)
                GOTO(out, rc = err_serious(-ENOMEM));
 
        repbody = req_capsule_server_get(info->mti_pill, &RMF_MDT_BODY);
                GOTO(out, rc = err_serious(-ENOMEM));
 
        repbody = req_capsule_server_get(info->mti_pill, &RMF_MDT_BODY);
-       repbody->fid1 = mdt->mdt_md_root_fid;
-       repbody->valid |= OBD_MD_FLID;
+       repbody->mbo_fid1 = mdt->mdt_md_root_fid;
+       repbody->mbo_valid |= OBD_MD_FLID;
 
        if (tsi->tsi_tgt->lut_mds_capa &&
            exp_connect_flags(info->mti_exp) & OBD_CONNECT_MDS_CAPA) {
                struct mdt_object       *root;
                struct lustre_capa      *capa;
 
 
        if (tsi->tsi_tgt->lut_mds_capa &&
            exp_connect_flags(info->mti_exp) & OBD_CONNECT_MDS_CAPA) {
                struct mdt_object       *root;
                struct lustre_capa      *capa;
 
-               root = mdt_object_find(info->mti_env, mdt, &repbody->fid1);
+               root = mdt_object_find(info->mti_env, mdt, &repbody->mbo_fid1);
                if (IS_ERR(root))
                        GOTO(out, rc = PTR_ERR(root));
 
                if (IS_ERR(root))
                        GOTO(out, rc = PTR_ERR(root));
 
@@ -299,7 +299,7 @@ static int mdt_getstatus(struct tgt_session_info *tsi)
                                  0);
                 mdt_object_put(info->mti_env, root);
                 if (rc == 0)
                                  0);
                 mdt_object_put(info->mti_env, root);
                 if (rc == 0)
-                        repbody->valid |= OBD_MD_FLMDSCAPA;
+                       repbody->mbo_valid |= OBD_MD_FLMDSCAPA;
         }
        EXIT;
 out:
         }
        EXIT;
 out:
@@ -383,9 +383,9 @@ static void mdt_pack_size2body(struct mdt_thread_info *info,
             !(ma->ma_valid & MA_SOM))
                 return;
 
             !(ma->ma_valid & MA_SOM))
                 return;
 
-        b->valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS;
-        b->size = ma->ma_som->msd_size;
-        b->blocks = ma->ma_som->msd_blocks;
+       b->mbo_valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS;
+       b->mbo_size = ma->ma_som->msd_size;
+       b->mbo_blocks = ma->ma_som->msd_blocks;
 }
 
 void mdt_pack_attr2body(struct mdt_thread_info *info, struct mdt_body *b,
 }
 
 void mdt_pack_attr2body(struct mdt_thread_info *info, struct mdt_body *b,
@@ -395,66 +395,68 @@ void mdt_pack_attr2body(struct mdt_thread_info *info, struct mdt_body *b,
 
         LASSERT(ma->ma_valid & MA_INODE);
 
 
         LASSERT(ma->ma_valid & MA_INODE);
 
-        b->atime      = attr->la_atime;
-        b->mtime      = attr->la_mtime;
-        b->ctime      = attr->la_ctime;
-        b->mode       = attr->la_mode;
-        b->size       = attr->la_size;
-        b->blocks     = attr->la_blocks;
-        b->uid        = attr->la_uid;
-        b->gid        = attr->la_gid;
-        b->flags      = attr->la_flags;
-        b->nlink      = attr->la_nlink;
-        b->rdev       = attr->la_rdev;
-
-        /*XXX should pack the reply body according to lu_valid*/
-        b->valid |= OBD_MD_FLCTIME | OBD_MD_FLUID   |
-                    OBD_MD_FLGID   | OBD_MD_FLTYPE  |
-                    OBD_MD_FLMODE  | OBD_MD_FLNLINK | OBD_MD_FLFLAGS |
-                    OBD_MD_FLATIME | OBD_MD_FLMTIME ;
-
-        if (!S_ISREG(attr->la_mode)) {
-                b->valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS | OBD_MD_FLRDEV;
+       b->mbo_atime      = attr->la_atime;
+       b->mbo_mtime      = attr->la_mtime;
+       b->mbo_ctime      = attr->la_ctime;
+       b->mbo_mode       = attr->la_mode;
+       b->mbo_size       = attr->la_size;
+       b->mbo_blocks     = attr->la_blocks;
+       b->mbo_uid      = attr->la_uid;
+       b->mbo_gid      = attr->la_gid;
+       b->mbo_flags      = attr->la_flags;
+       b->mbo_nlink      = attr->la_nlink;
+       b->mbo_rdev       = attr->la_rdev;
+
+       /* XXX should pack the reply body according to lu_valid */
+       b->mbo_valid |= OBD_MD_FLCTIME | OBD_MD_FLUID   |
+                       OBD_MD_FLGID   | OBD_MD_FLTYPE  |
+                       OBD_MD_FLMODE  | OBD_MD_FLNLINK | OBD_MD_FLFLAGS |
+                       OBD_MD_FLATIME | OBD_MD_FLMTIME ;
+
+       if (!S_ISREG(attr->la_mode)) {
+               b->mbo_valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS | OBD_MD_FLRDEV;
        } else if (ma->ma_need & MA_LOV && !(ma->ma_valid & MA_LOV)) {
        } else if (ma->ma_need & MA_LOV && !(ma->ma_valid & MA_LOV)) {
-                /* means no objects are allocated on osts. */
-                LASSERT(!(ma->ma_valid & MA_LOV));
-                /* just ignore blocks occupied by extend attributes on MDS */
-                b->blocks = 0;
-                /* if no object is allocated on osts, the size on mds is valid. b=22272 */
-                b->valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS;
+               /* means no objects are allocated on osts. */
+               LASSERT(!(ma->ma_valid & MA_LOV));
+               /* just ignore blocks occupied by extend attributes on MDS */
+               b->mbo_blocks = 0;
+               /* if no object is allocated on osts, the size on mds is valid.
+                * b=22272 */
+               b->mbo_valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS;
        } else if ((ma->ma_valid & MA_LOV) && ma->ma_lmm != NULL &&
                   ma->ma_lmm->lmm_pattern & LOV_PATTERN_F_RELEASED) {
                /* A released file stores its size on MDS. */
                /* But return 1 block for released file, unless tools like tar
                 * will consider it fully sparse. (LU-3864)
                 */
        } else if ((ma->ma_valid & MA_LOV) && ma->ma_lmm != NULL &&
                   ma->ma_lmm->lmm_pattern & LOV_PATTERN_F_RELEASED) {
                /* A released file stores its size on MDS. */
                /* But return 1 block for released file, unless tools like tar
                 * will consider it fully sparse. (LU-3864)
                 */
-               if (unlikely(b->size == 0))
-                       b->blocks = 0;
+               if (unlikely(b->mbo_size == 0))
+                       b->mbo_blocks = 0;
                else
                else
-                       b->blocks = 1;
-               b->valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS;
+                       b->mbo_blocks = 1;
+               b->mbo_valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS;
        }
 
        }
 
-        if (fid) {
-                b->fid1 = *fid;
-                b->valid |= OBD_MD_FLID;
-                CDEBUG(D_INODE, DFID": nlink=%d, mode=%o, size="LPU64"\n",
-                                PFID(fid), b->nlink, b->mode, b->size);
-        }
+       if (fid) {
+               b->mbo_fid1 = *fid;
+               b->mbo_valid |= OBD_MD_FLID;
+               CDEBUG(D_INODE, DFID": nlink=%d, mode=%o, size="LPU64"\n",
+                               PFID(fid), b->mbo_nlink,
+                      b->mbo_mode, b->mbo_size);
+       }
 
 
-        if (info)
-                mdt_body_reverse_idmap(info, b);
+       if (info)
+               mdt_body_reverse_idmap(info, b);
 
 
-       if (fid != NULL && (b->valid & OBD_MD_FLSIZE))
-                CDEBUG(D_VFSTRACE, DFID": returning size %llu\n",
-                       PFID(fid), (unsigned long long)b->size);
+       if (fid != NULL && (b->mbo_valid & OBD_MD_FLSIZE))
+               CDEBUG(D_VFSTRACE, DFID": returning size %llu\n",
+                      PFID(fid), (unsigned long long)b->mbo_size);
 }
 
 static inline int mdt_body_has_lov(const struct lu_attr *la,
 }
 
 static inline int mdt_body_has_lov(const struct lu_attr *la,
-                                   const struct mdt_body *body)
+                                  const struct mdt_body *body)
 {
 {
-        return ((S_ISREG(la->la_mode) && (body->valid & OBD_MD_FLEASIZE)) ||
-                (S_ISDIR(la->la_mode) && (body->valid & OBD_MD_FLDIREA )) );
+       return (S_ISREG(la->la_mode) && (body->mbo_valid & OBD_MD_FLEASIZE)) ||
+              (S_ISDIR(la->la_mode) && (body->mbo_valid & OBD_MD_FLDIREA));
 }
 
 void mdt_client_compatibility(struct mdt_thread_info *info)
 }
 
 void mdt_client_compatibility(struct mdt_thread_info *info)
@@ -799,12 +801,12 @@ static int mdt_getattr_internal(struct mdt_thread_info *info,
                if (!mdt_is_dne_client(req->rq_export))
                        GOTO(out, rc = -ENOTSUPP);
 
                if (!mdt_is_dne_client(req->rq_export))
                        GOTO(out, rc = -ENOTSUPP);
 
-               repbody->fid1 = *mdt_object_fid(o);
-               repbody->valid = OBD_MD_FLID | OBD_MD_MDS;
+               repbody->mbo_fid1 = *mdt_object_fid(o);
+               repbody->mbo_valid = OBD_MD_FLID | OBD_MD_MDS;
                GOTO(out, rc = 0);
        }
 
                GOTO(out, rc = 0);
        }
 
-       if (reqbody->eadatasize > 0) {
+       if (reqbody->mbo_eadatasize > 0) {
                buffer->lb_buf = req_capsule_server_get(pill, &RMF_MDT_MD);
                if (buffer->lb_buf == NULL)
                        GOTO(out, rc = -EPROTO);
                buffer->lb_buf = req_capsule_server_get(pill, &RMF_MDT_MD);
                if (buffer->lb_buf == NULL)
                        GOTO(out, rc = -EPROTO);
@@ -821,15 +823,15 @@ static int mdt_getattr_internal(struct mdt_thread_info *info,
 
        /* If it is dir object and client require MEA, then we got MEA */
        if (S_ISDIR(lu_object_attr(&next->mo_lu)) &&
 
        /* If it is dir object and client require MEA, then we got MEA */
        if (S_ISDIR(lu_object_attr(&next->mo_lu)) &&
-           (reqbody->valid & (OBD_MD_MEA | OBD_MD_DEFAULT_MEA))) {
+           (reqbody->mbo_valid & (OBD_MD_MEA | OBD_MD_DEFAULT_MEA))) {
                /* Assumption: MDT_MD size is enough for lmv size. */
                ma->ma_lmv = buffer->lb_buf;
                ma->ma_lmv_size = buffer->lb_len;
                ma->ma_need = MA_INODE;
                if (ma->ma_lmv_size > 0) {
                /* Assumption: MDT_MD size is enough for lmv size. */
                ma->ma_lmv = buffer->lb_buf;
                ma->ma_lmv_size = buffer->lb_len;
                ma->ma_need = MA_INODE;
                if (ma->ma_lmv_size > 0) {
-                       if (reqbody->valid & OBD_MD_MEA)
+                       if (reqbody->mbo_valid & OBD_MD_MEA)
                                ma->ma_need |= MA_LMV;
                                ma->ma_need |= MA_LMV;
-                       else if (reqbody->valid & OBD_MD_DEFAULT_MEA)
+                       else if (reqbody->mbo_valid & OBD_MD_DEFAULT_MEA)
                                ma->ma_need |= MA_LMV_DEF;
                }
        } else {
                                ma->ma_need |= MA_LMV_DEF;
                }
        } else {
@@ -841,7 +843,7 @@ static int mdt_getattr_internal(struct mdt_thread_info *info,
        }
 
         if (S_ISDIR(lu_object_attr(&next->mo_lu)) &&
        }
 
         if (S_ISDIR(lu_object_attr(&next->mo_lu)) &&
-            reqbody->valid & OBD_MD_FLDIREA  &&
+           reqbody->mbo_valid & OBD_MD_FLDIREA  &&
             lustre_msg_get_opc(req->rq_reqmsg) == MDS_GETATTR) {
                 /* get default stripe info for this dir. */
                 ma->ma_need |= MA_LOV_DEF;
             lustre_msg_get_opc(req->rq_reqmsg) == MDS_GETATTR) {
                 /* get default stripe info for this dir. */
                 ma->ma_need |= MA_LOV_DEF;
@@ -861,8 +863,8 @@ static int mdt_getattr_internal(struct mdt_thread_info *info,
        /* if file is released, check if a restore is running */
        if ((ma->ma_valid & MA_HSM) && (ma->ma_hsm.mh_flags & HS_RELEASED) &&
            mdt_hsm_restore_is_running(info, mdt_object_fid(o))) {
        /* if file is released, check if a restore is running */
        if ((ma->ma_valid & MA_HSM) && (ma->ma_hsm.mh_flags & HS_RELEASED) &&
            mdt_hsm_restore_is_running(info, mdt_object_fid(o))) {
-               repbody->t_state = MS_RESTORE;
-               repbody->valid |= OBD_MD_TSTATE;
+               repbody->mbo_t_state = MS_RESTORE;
+               repbody->mbo_valid |= OBD_MD_TSTATE;
        }
 
        is_root = lu_fid_eq(mdt_object_fid(o), &info->mti_mdt->mdt_md_root_fid);
        }
 
        is_root = lu_fid_eq(mdt_object_fid(o), &info->mti_mdt->mdt_md_root_fid);
@@ -899,12 +901,12 @@ static int mdt_getattr_internal(struct mdt_thread_info *info,
         if (mdt_body_has_lov(la, reqbody)) {
                 if (ma->ma_valid & MA_LOV) {
                         LASSERT(ma->ma_lmm_size);
         if (mdt_body_has_lov(la, reqbody)) {
                 if (ma->ma_valid & MA_LOV) {
                         LASSERT(ma->ma_lmm_size);
-                        repbody->eadatasize = ma->ma_lmm_size;
-                        if (S_ISDIR(la->la_mode))
-                                repbody->valid |= OBD_MD_FLDIREA;
-                        else
-                                repbody->valid |= OBD_MD_FLEASIZE;
-                        mdt_dump_lmm(D_INFO, ma->ma_lmm, repbody->valid);
+                       repbody->mbo_eadatasize = ma->ma_lmm_size;
+                       if (S_ISDIR(la->la_mode))
+                               repbody->mbo_valid |= OBD_MD_FLDIREA;
+                       else
+                               repbody->mbo_valid |= OBD_MD_FLEASIZE;
+                       mdt_dump_lmm(D_INFO, ma->ma_lmm, repbody->mbo_valid);
                 }
                if (ma->ma_valid & MA_LMV) {
                        /* Return -ENOTSUPP for old client */
                 }
                if (ma->ma_valid & MA_LMV) {
                        /* Return -ENOTSUPP for old client */
@@ -913,23 +915,24 @@ static int mdt_getattr_internal(struct mdt_thread_info *info,
 
                        LASSERT(S_ISDIR(la->la_mode));
                        mdt_dump_lmv(D_INFO, ma->ma_lmv);
 
                        LASSERT(S_ISDIR(la->la_mode));
                        mdt_dump_lmv(D_INFO, ma->ma_lmv);
-                       repbody->eadatasize = ma->ma_lmv_size;
-                       repbody->valid |= (OBD_MD_FLDIREA|OBD_MD_MEA);
+                       repbody->mbo_eadatasize = ma->ma_lmv_size;
+                       repbody->mbo_valid |= (OBD_MD_FLDIREA|OBD_MD_MEA);
                }
                if (ma->ma_valid & MA_LMV_DEF) {
                        /* Return -ENOTSUPP for old client */
                        if (!mdt_is_striped_client(req->rq_export))
                                RETURN(-ENOTSUPP);
                        LASSERT(S_ISDIR(la->la_mode));
                }
                if (ma->ma_valid & MA_LMV_DEF) {
                        /* Return -ENOTSUPP for old client */
                        if (!mdt_is_striped_client(req->rq_export))
                                RETURN(-ENOTSUPP);
                        LASSERT(S_ISDIR(la->la_mode));
-                       repbody->eadatasize = ma->ma_lmv_size;
-                       repbody->valid |= (OBD_MD_FLDIREA|OBD_MD_DEFAULT_MEA);
+                       repbody->mbo_eadatasize = ma->ma_lmv_size;
+                       repbody->mbo_valid |= (OBD_MD_FLDIREA |
+                                              OBD_MD_DEFAULT_MEA);
                }
        } else if (S_ISLNK(la->la_mode) &&
                }
        } else if (S_ISLNK(la->la_mode) &&
-                  reqbody->valid & OBD_MD_LINKNAME) {
+                  reqbody->mbo_valid & OBD_MD_LINKNAME) {
                buffer->lb_buf = ma->ma_lmm;
                /* eadatasize from client includes NULL-terminator, so
                 * there is no need to read it */
                buffer->lb_buf = ma->ma_lmm;
                /* eadatasize from client includes NULL-terminator, so
                 * there is no need to read it */
-               buffer->lb_len = reqbody->eadatasize - 1;
+               buffer->lb_len = reqbody->mbo_eadatasize - 1;
                rc = mo_readlink(env, next, buffer);
                if (unlikely(rc <= 0)) {
                        CERROR("%s: readlink failed for "DFID": rc = %d\n",
                rc = mo_readlink(env, next, buffer);
                if (unlikely(rc <= 0)) {
                        CERROR("%s: readlink failed for "DFID": rc = %d\n",
@@ -941,16 +944,16 @@ static int mdt_getattr_internal(struct mdt_thread_info *info,
 
                        if (OBD_FAIL_CHECK(OBD_FAIL_MDS_READLINK_EPROTO))
                                rc -= 2;
 
                        if (OBD_FAIL_CHECK(OBD_FAIL_MDS_READLINK_EPROTO))
                                rc -= 2;
-                       repbody->valid |= OBD_MD_LINKNAME;
+                       repbody->mbo_valid |= OBD_MD_LINKNAME;
                        /* we need to report back size with NULL-terminator
                         * because client expects that */
                        /* we need to report back size with NULL-terminator
                         * because client expects that */
-                       repbody->eadatasize = rc + 1;
-                       if (repbody->eadatasize != reqbody->eadatasize)
+                       repbody->mbo_eadatasize = rc + 1;
+                       if (repbody->mbo_eadatasize != reqbody->mbo_eadatasize)
                                CDEBUG(D_INODE, "%s: Read shorter symlink %d "
                                       "on "DFID ", expected %d\n",
                                       mdt_obd_name(info->mti_mdt),
                                       rc, PFID(mdt_object_fid(o)),
                                CDEBUG(D_INODE, "%s: Read shorter symlink %d "
                                       "on "DFID ", expected %d\n",
                                       mdt_obd_name(info->mti_mdt),
                                       rc, PFID(mdt_object_fid(o)),
-                                      reqbody->eadatasize - 1);
+                                      reqbody->mbo_eadatasize - 1);
                        /* NULL terminate */
                        ((char *)ma->ma_lmm)[rc] = 0;
 
                        /* NULL terminate */
                        ((char *)ma->ma_lmm)[rc] = 0;
 
@@ -964,33 +967,33 @@ static int mdt_getattr_internal(struct mdt_thread_info *info,
                 }
         }
 
                 }
         }
 
-        if (reqbody->valid & OBD_MD_FLMODEASIZE) {
-               repbody->max_cookiesize = 0;
-                repbody->max_mdsize = info->mti_mdt->mdt_max_mdsize;
-                repbody->valid |= OBD_MD_FLMODEASIZE;
-                CDEBUG(D_INODE, "I am going to change the MAX_MD_SIZE & "
-                       "MAX_COOKIE to : %d:%d\n", repbody->max_mdsize,
-                       repbody->max_cookiesize);
-        }
+       if (reqbody->mbo_valid & OBD_MD_FLMODEASIZE) {
+               repbody->mbo_max_cookiesize = 0;
+               repbody->mbo_max_mdsize = info->mti_mdt->mdt_max_mdsize;
+               repbody->mbo_valid |= OBD_MD_FLMODEASIZE;
+               CDEBUG(D_INODE, "I am going to change the MAX_MD_SIZE & "
+                      "MAX_COOKIE to : %d:%d\n", repbody->mbo_max_mdsize,
+                      repbody->mbo_max_cookiesize);
+       }
 
 
-        if (exp_connect_rmtclient(info->mti_exp) &&
-            reqbody->valid & OBD_MD_FLRMTPERM) {
-                void *buf = req_capsule_server_get(pill, &RMF_ACL);
+       if (exp_connect_rmtclient(info->mti_exp) &&
+           reqbody->mbo_valid & OBD_MD_FLRMTPERM) {
+               void *buf = req_capsule_server_get(pill, &RMF_ACL);
 
 
-                /* mdt_getattr_lock only */
-                rc = mdt_pack_remote_perm(info, o, buf);
-                if (rc) {
-                        repbody->valid &= ~OBD_MD_FLRMTPERM;
-                        repbody->aclsize = 0;
-                        RETURN(rc);
-                } else {
-                        repbody->valid |= OBD_MD_FLRMTPERM;
-                        repbody->aclsize = sizeof(struct mdt_remote_perm);
-                }
-        }
+               /* mdt_getattr_lock only */
+               rc = mdt_pack_remote_perm(info, o, buf);
+               if (rc) {
+                       repbody->mbo_valid &= ~OBD_MD_FLRMTPERM;
+                       repbody->mbo_aclsize = 0;
+                       RETURN(rc);
+               } else {
+                       repbody->mbo_valid |= OBD_MD_FLRMTPERM;
+                       repbody->mbo_aclsize = sizeof(struct mdt_remote_perm);
+               }
+       }
 #ifdef CONFIG_FS_POSIX_ACL
        else if ((exp_connect_flags(req->rq_export) & OBD_CONNECT_ACL) &&
 #ifdef CONFIG_FS_POSIX_ACL
        else if ((exp_connect_flags(req->rq_export) & OBD_CONNECT_ACL) &&
-                (reqbody->valid & OBD_MD_FLACL)) {
+                (reqbody->mbo_valid & OBD_MD_FLACL)) {
                 buffer->lb_buf = req_capsule_server_get(pill, &RMF_ACL);
                 buffer->lb_len = req_capsule_get_size(pill,
                                                       &RMF_ACL, RCL_SERVER);
                 buffer->lb_buf = req_capsule_server_get(pill, &RMF_ACL);
                 buffer->lb_len = req_capsule_get_size(pill,
                                                       &RMF_ACL, RCL_SERVER);
@@ -999,8 +1002,8 @@ static int mdt_getattr_internal(struct mdt_thread_info *info,
                                           XATTR_NAME_ACL_ACCESS);
                         if (rc < 0) {
                                 if (rc == -ENODATA) {
                                           XATTR_NAME_ACL_ACCESS);
                         if (rc < 0) {
                                 if (rc == -ENODATA) {
-                                        repbody->aclsize = 0;
-                                        repbody->valid |= OBD_MD_FLACL;
+                                       repbody->mbo_aclsize = 0;
+                                       repbody->mbo_valid |= OBD_MD_FLACL;
                                         rc = 0;
                                 } else if (rc == -EOPNOTSUPP) {
                                         rc = 0;
                                         rc = 0;
                                 } else if (rc == -EOPNOTSUPP) {
                                         rc = 0;
@@ -1011,15 +1014,15 @@ static int mdt_getattr_internal(struct mdt_thread_info *info,
                                               PFID(mdt_object_fid(o)), rc);
                                }
                         } else {
                                               PFID(mdt_object_fid(o)), rc);
                                }
                         } else {
-                                repbody->aclsize = rc;
-                                repbody->valid |= OBD_MD_FLACL;
-                                rc = 0;
-                        }
-                }
-        }
+                               repbody->mbo_aclsize = rc;
+                               repbody->mbo_valid |= OBD_MD_FLACL;
+                               rc = 0;
+                       }
+               }
+       }
 #endif
 
 #endif
 
-       if (reqbody->valid & OBD_MD_FLMDSCAPA &&
+       if (reqbody->mbo_valid & OBD_MD_FLMDSCAPA &&
            info->mti_mdt->mdt_lut.lut_mds_capa &&
            exp_connect_flags(info->mti_exp) & OBD_CONNECT_MDS_CAPA) {
                 struct lustre_capa *capa;
            info->mti_mdt->mdt_lut.lut_mds_capa &&
            exp_connect_flags(info->mti_exp) & OBD_CONNECT_MDS_CAPA) {
                 struct lustre_capa *capa;
@@ -1030,7 +1033,7 @@ static int mdt_getattr_internal(struct mdt_thread_info *info,
                 rc = mo_capa_get(env, next, capa, 0);
                 if (rc)
                         RETURN(rc);
                 rc = mo_capa_get(env, next, capa, 0);
                 if (rc)
                         RETURN(rc);
-                repbody->valid |= OBD_MD_FLMDSCAPA;
+               repbody->mbo_valid |= OBD_MD_FLMDSCAPA;
         }
 
 out:
         }
 
 out:
@@ -1068,7 +1071,7 @@ static int mdt_renew_capa(struct mdt_thread_info *info)
         *capa = *c;
         rc = mo_capa_get(info->mti_env, mdt_object_child(obj), capa, 1);
         if (rc == 0)
         *capa = *c;
         rc = mo_capa_get(info->mti_env, mdt_object_child(obj), capa, 1);
         if (rc == 0)
-                body->valid |= OBD_MD_FLOSSCAPA;
+               body->mbo_valid |= OBD_MD_FLOSSCAPA;
         RETURN(rc);
 }
 
         RETURN(rc);
 }
 
@@ -1085,7 +1088,7 @@ static int mdt_getattr(struct tgt_session_info *tsi)
         reqbody = req_capsule_client_get(pill, &RMF_MDT_BODY);
         LASSERT(reqbody);
 
         reqbody = req_capsule_client_get(pill, &RMF_MDT_BODY);
         LASSERT(reqbody);
 
-        if (reqbody->valid & OBD_MD_FLOSSCAPA) {
+       if (reqbody->mbo_valid & OBD_MD_FLOSSCAPA) {
                 rc = req_capsule_server_pack(pill);
                 if (unlikely(rc))
                         RETURN(err_serious(rc));
                 rc = req_capsule_server_pack(pill);
                 if (unlikely(rc))
                         RETURN(err_serious(rc));
@@ -1101,7 +1104,7 @@ static int mdt_getattr(struct tgt_session_info *tsi)
         * guess at EA size by just reading it from disk.
         * Exceptions are readdir and (missing) directory striping */
        /* Readlink */
         * guess at EA size by just reading it from disk.
         * Exceptions are readdir and (missing) directory striping */
        /* Readlink */
-       if (reqbody->valid & OBD_MD_LINKNAME) {
+       if (reqbody->mbo_valid & OBD_MD_LINKNAME) {
                /* No easy way to know how long is the symlink, but it cannot
                 * be more than PATH_MAX, so we allocate +1 */
                rc = PATH_MAX + 1;
                /* No easy way to know how long is the symlink, but it cannot
                 * be more than PATH_MAX, so we allocate +1 */
                rc = PATH_MAX + 1;
@@ -1111,7 +1114,7 @@ static int mdt_getattr(struct tgt_session_info *tsi)
         */
        } else if (lu_fid_eq(mdt_object_fid(obj),
                             &info->mti_mdt->mdt_md_root_fid) &&
         */
        } else if (lu_fid_eq(mdt_object_fid(obj),
                             &info->mti_mdt->mdt_md_root_fid) &&
-                  (reqbody->valid & OBD_MD_FLDIREA) &&
+                  (reqbody->mbo_valid & OBD_MD_FLDIREA) &&
                   (lustre_msg_get_opc(mdt_info_req(info)->rq_reqmsg) ==
                                                                 MDS_GETATTR)) {
                /* Should the default strping be bigger, mdt_fix_reply
                   (lustre_msg_get_opc(mdt_info_req(info)->rq_reqmsg) ==
                                                                 MDS_GETATTR)) {
                /* Should the default strping be bigger, mdt_fix_reply
@@ -1133,25 +1136,25 @@ static int mdt_getattr(struct tgt_session_info *tsi)
 
         repbody = req_capsule_server_get(pill, &RMF_MDT_BODY);
         LASSERT(repbody != NULL);
 
         repbody = req_capsule_server_get(pill, &RMF_MDT_BODY);
         LASSERT(repbody != NULL);
-        repbody->eadatasize = 0;
-        repbody->aclsize = 0;
+       repbody->mbo_eadatasize = 0;
+       repbody->mbo_aclsize = 0;
 
 
-        if (reqbody->valid & OBD_MD_FLRMTPERM)
-                rc = mdt_init_ucred(info, reqbody);
-        else
-                rc = mdt_check_ucred(info);
-        if (unlikely(rc))
-                GOTO(out_shrink, rc);
+       if (reqbody->mbo_valid & OBD_MD_FLRMTPERM)
+               rc = mdt_init_ucred(info, reqbody);
+       else
+               rc = mdt_check_ucred(info);
+       if (unlikely(rc))
+               GOTO(out_shrink, rc);
 
 
-        info->mti_cross_ref = !!(reqbody->valid & OBD_MD_FLCROSSREF);
+       info->mti_cross_ref = !!(reqbody->mbo_valid & OBD_MD_FLCROSSREF);
 
 
-        /*
-         * Don't check capability at all, because rename might getattr for
-         * remote obj, and at that time no capability is available.
-         */
-        mdt_set_capainfo(info, 1, &reqbody->fid1, BYPASS_CAPA);
-        rc = mdt_getattr_internal(info, obj, 0);
-        if (reqbody->valid & OBD_MD_FLRMTPERM)
+       /*
+        * Don't check capability at all, because rename might getattr for
+        * remote obj, and at that time no capability is available.
+        */
+       mdt_set_capainfo(info, 1, &reqbody->mbo_fid1, BYPASS_CAPA);
+       rc = mdt_getattr_internal(info, obj, 0);
+       if (reqbody->mbo_valid & OBD_MD_FLRMTPERM)
                 mdt_exit_ucred(info);
         EXIT;
 out_shrink:
                 mdt_exit_ucred(info);
         EXIT;
 out_shrink:
@@ -1191,25 +1194,25 @@ static int mdt_swap_layouts(struct tgt_session_info *tsi)
                ldlm_request_cancel(req, info->mti_dlm_req, 0);
 
        if (req_capsule_get_size(info->mti_pill, &RMF_CAPA1, RCL_CLIENT))
                ldlm_request_cancel(req, info->mti_dlm_req, 0);
 
        if (req_capsule_get_size(info->mti_pill, &RMF_CAPA1, RCL_CLIENT))
-               mdt_set_capainfo(info, 0, &info->mti_body->fid1,
+               mdt_set_capainfo(info, 0, &info->mti_body->mbo_fid1,
                                 req_capsule_client_get(info->mti_pill,
                                                        &RMF_CAPA1));
 
        if (req_capsule_get_size(info->mti_pill, &RMF_CAPA2, RCL_CLIENT))
                                 req_capsule_client_get(info->mti_pill,
                                                        &RMF_CAPA1));
 
        if (req_capsule_get_size(info->mti_pill, &RMF_CAPA2, RCL_CLIENT))
-               mdt_set_capainfo(info, 1, &info->mti_body->fid2,
+               mdt_set_capainfo(info, 1, &info->mti_body->mbo_fid2,
                                 req_capsule_client_get(info->mti_pill,
                                                        &RMF_CAPA2));
 
        o1 = info->mti_object;
        o = o2 = mdt_object_find(info->mti_env, info->mti_mdt,
                                 req_capsule_client_get(info->mti_pill,
                                                        &RMF_CAPA2));
 
        o1 = info->mti_object;
        o = o2 = mdt_object_find(info->mti_env, info->mti_mdt,
-                               &info->mti_body->fid2);
+                               &info->mti_body->mbo_fid2);
        if (IS_ERR(o))
                GOTO(out, rc = PTR_ERR(o));
 
        if (mdt_object_remote(o) || !mdt_object_exists(o)) /* remote object */
                GOTO(put, rc = -ENOENT);
 
        if (IS_ERR(o))
                GOTO(out, rc = PTR_ERR(o));
 
        if (mdt_object_remote(o) || !mdt_object_exists(o)) /* remote object */
                GOTO(put, rc = -ENOENT);
 
-       rc = lu_fid_cmp(&info->mti_body->fid1, &info->mti_body->fid2);
+       rc = lu_fid_cmp(&info->mti_body->mbo_fid1, &info->mti_body->mbo_fid2);
        if (unlikely(rc == 0)) /* same file, you kidding me? no-op. */
                GOTO(put, rc);
 
        if (unlikely(rc == 0)) /* same file, you kidding me? no-op. */
                GOTO(put, rc);
 
@@ -1273,7 +1276,7 @@ static int mdt_raw_lookup(struct mdt_thread_info *info,
         int rc;
         ENTRY;
 
         int rc;
         ENTRY;
 
-        if (reqbody->valid != OBD_MD_FLID)
+       if (reqbody->mbo_valid != OBD_MD_FLID)
                 RETURN(0);
 
         LASSERT(!info->mti_cross_ref);
                 RETURN(0);
 
         LASSERT(!info->mti_cross_ref);
@@ -1295,8 +1298,8 @@ static int mdt_raw_lookup(struct mdt_thread_info *info,
 #endif
         if (rc == 0) {
                 repbody = req_capsule_server_get(info->mti_pill, &RMF_MDT_BODY);
 #endif
         if (rc == 0) {
                 repbody = req_capsule_server_get(info->mti_pill, &RMF_MDT_BODY);
-                repbody->fid1 = *child_fid;
-                repbody->valid = OBD_MD_FLID;
+               repbody->mbo_fid1 = *child_fid;
+               repbody->mbo_valid = OBD_MD_FLID;
         }
         RETURN(1);
 }
         }
         RETURN(1);
 }
@@ -1397,7 +1400,7 @@ static int mdt_getattr_name_lock(struct mdt_thread_info *info,
                if (unlikely(reqbody == NULL))
                        RETURN(err_serious(-EPROTO));
 
                if (unlikely(reqbody == NULL))
                        RETURN(err_serious(-EPROTO));
 
-               *child_fid = reqbody->fid2;
+               *child_fid = reqbody->mbo_fid2;
 
                if (unlikely(!fid_is_sane(child_fid)))
                        RETURN(err_serious(-EINVAL));
 
                if (unlikely(!fid_is_sane(child_fid)))
                        RETURN(err_serious(-EINVAL));
@@ -1405,7 +1408,7 @@ static int mdt_getattr_name_lock(struct mdt_thread_info *info,
                CDEBUG(D_INODE, "getattr with lock for "DFID"/"DFID", "
                       "ldlm_rep = %p\n",
                       PFID(mdt_object_fid(parent)),
                CDEBUG(D_INODE, "getattr with lock for "DFID"/"DFID", "
                       "ldlm_rep = %p\n",
                       PFID(mdt_object_fid(parent)),
-                      PFID(&reqbody->fid2), ldlm_rep);
+                      PFID(&reqbody->mbo_fid2), ldlm_rep);
        }
 
        mdt_set_disposition(info, ldlm_rep, DISP_LOOKUP_EXECD);
        }
 
        mdt_set_disposition(info, ldlm_rep, DISP_LOOKUP_EXECD);
@@ -1620,9 +1623,9 @@ static int mdt_getattr_name(struct tgt_session_info *tsi)
         repbody = req_capsule_server_get(info->mti_pill, &RMF_MDT_BODY);
         LASSERT(repbody != NULL);
 
         repbody = req_capsule_server_get(info->mti_pill, &RMF_MDT_BODY);
         LASSERT(repbody != NULL);
 
-        info->mti_cross_ref = !!(reqbody->valid & OBD_MD_FLCROSSREF);
-        repbody->eadatasize = 0;
-        repbody->aclsize = 0;
+       info->mti_cross_ref = !!(reqbody->mbo_valid & OBD_MD_FLCROSSREF);
+       repbody->mbo_eadatasize = 0;
+       repbody->mbo_aclsize = 0;
 
         rc = mdt_init_ucred(info, reqbody);
         if (unlikely(rc))
 
         rc = mdt_init_ucred(info, reqbody);
         if (unlikely(rc))
@@ -1729,17 +1732,17 @@ static int mdt_readpage(struct tgt_session_info *tsi)
          * reqbody->size contains offset of where to start to read and
          * reqbody->nlink contains number bytes to read.
          */
          * reqbody->size contains offset of where to start to read and
          * reqbody->nlink contains number bytes to read.
          */
-        rdpg->rp_hash = reqbody->size;
-        if (rdpg->rp_hash != reqbody->size) {
-                CERROR("Invalid hash: "LPX64" != "LPX64"\n",
-                       rdpg->rp_hash, reqbody->size);
-                RETURN(-EFAULT);
-        }
+       rdpg->rp_hash = reqbody->mbo_size;
+       if (rdpg->rp_hash != reqbody->mbo_size) {
+               CERROR("Invalid hash: "LPX64" != "LPX64"\n",
+                      rdpg->rp_hash, reqbody->mbo_size);
+               RETURN(-EFAULT);
+       }
 
 
-        rdpg->rp_attrs = reqbody->mode;
+       rdpg->rp_attrs = reqbody->mbo_mode;
        if (exp_connect_flags(tsi->tsi_exp) & OBD_CONNECT_64BITHASH)
                rdpg->rp_attrs |= LUDA_64BITHASH;
        if (exp_connect_flags(tsi->tsi_exp) & OBD_CONNECT_64BITHASH)
                rdpg->rp_attrs |= LUDA_64BITHASH;
-       rdpg->rp_count  = min_t(unsigned int, reqbody->nlink,
+       rdpg->rp_count  = min_t(unsigned int, reqbody->mbo_nlink,
                                exp_max_brw_size(tsi->tsi_exp));
        rdpg->rp_npages = (rdpg->rp_count + PAGE_CACHE_SIZE - 1) >>
                          PAGE_CACHE_SHIFT;
                                exp_max_brw_size(tsi->tsi_exp));
        rdpg->rp_npages = (rdpg->rp_count + PAGE_CACHE_SIZE - 1) >>
                          PAGE_CACHE_SHIFT;
@@ -1809,8 +1812,8 @@ static int mdt_reint_internal(struct mdt_thread_info *info,
         if (req_capsule_has_field(pill, &RMF_MDT_BODY, RCL_SERVER)) {
                 repbody = req_capsule_server_get(pill, &RMF_MDT_BODY);
                 LASSERT(repbody);
         if (req_capsule_has_field(pill, &RMF_MDT_BODY, RCL_SERVER)) {
                 repbody = req_capsule_server_get(pill, &RMF_MDT_BODY);
                 LASSERT(repbody);
-                repbody->eadatasize = 0;
-                repbody->aclsize = 0;
+               repbody->mbo_eadatasize = 0;
+               repbody->mbo_aclsize = 0;
         }
 
         OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_REINT_DELAY, 10);
         }
 
         OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_REINT_DELAY, 10);
@@ -1947,7 +1950,7 @@ static int mdt_sync(struct tgt_session_info *tsi)
        if (OBD_FAIL_CHECK(OBD_FAIL_MDS_SYNC_PACK))
                RETURN(err_serious(-ENOMEM));
 
        if (OBD_FAIL_CHECK(OBD_FAIL_MDS_SYNC_PACK))
                RETURN(err_serious(-ENOMEM));
 
-       if (fid_seq(&tsi->tsi_mdt_body->fid1) == 0) {
+       if (fid_seq(&tsi->tsi_mdt_body->mbo_fid1) == 0) {
                rc = mdt_device_sync(tsi->tsi_env, mdt_exp2dev(tsi->tsi_exp));
        } else {
                struct mdt_thread_info *info = tsi2mdt_info(tsi);
                rc = mdt_device_sync(tsi->tsi_env, mdt_exp2dev(tsi->tsi_exp));
        } else {
                struct mdt_thread_info *info = tsi2mdt_info(tsi);
@@ -2675,11 +2678,11 @@ static int mdt_body_unpack(struct mdt_thread_info *info, __u32 flags)
         if (body == NULL)
                 RETURN(-EFAULT);
 
         if (body == NULL)
                 RETURN(-EFAULT);
 
-        if (!(body->valid & OBD_MD_FLID))
-                RETURN(0);
+       if (!(body->mbo_valid & OBD_MD_FLID))
+               RETURN(0);
 
 
-        if (!fid_is_sane(&body->fid1)) {
-                CERROR("Invalid fid: "DFID"\n", PFID(&body->fid1));
+       if (!fid_is_sane(&body->mbo_fid1)) {
+               CERROR("Invalid fid: "DFID"\n", PFID(&body->mbo_fid1));
                 RETURN(-EINVAL);
         }
 
                 RETURN(-EINVAL);
         }
 
@@ -2690,17 +2693,17 @@ static int mdt_body_unpack(struct mdt_thread_info *info, __u32 flags)
          */
         if (req_capsule_has_field(pill, &RMF_CAPA1, RCL_CLIENT) &&
             req_capsule_get_size(pill, &RMF_CAPA1, RCL_CLIENT))
          */
         if (req_capsule_has_field(pill, &RMF_CAPA1, RCL_CLIENT) &&
             req_capsule_get_size(pill, &RMF_CAPA1, RCL_CLIENT))
-                mdt_set_capainfo(info, 0, &body->fid1,
-                                 req_capsule_client_get(pill, &RMF_CAPA1));
-
-        obj = mdt_object_find(env, info->mti_mdt, &body->fid1);
-        if (!IS_ERR(obj)) {
-                if ((flags & HABEO_CORPUS) &&
-                    !mdt_object_exists(obj)) {
-                        mdt_object_put(env, obj);
-                        /* for capability renew ENOENT will be handled in
-                         * mdt_renew_capa */
-                        if (body->valid & OBD_MD_FLOSSCAPA)
+               mdt_set_capainfo(info, 0, &body->mbo_fid1,
+                                req_capsule_client_get(pill, &RMF_CAPA1));
+
+       obj = mdt_object_find(env, info->mti_mdt, &body->mbo_fid1);
+       if (!IS_ERR(obj)) {
+               if ((flags & HABEO_CORPUS) &&
+                   !mdt_object_exists(obj)) {
+                       mdt_object_put(env, obj);
+                       /* for capability renew ENOENT will be handled in
+                        * mdt_renew_capa */
+                       if (body->mbo_valid & OBD_MD_FLOSSCAPA)
                                 rc = 0;
                         else
                                 rc = -ENOENT;
                                 rc = 0;
                         else
                                 rc = -ENOENT;
@@ -2850,7 +2853,8 @@ struct mdt_thread_info *tsi2mdt_info(struct tgt_session_info *tsi)
                if (req_capsule_has_field(pill, &RMF_CAPA1, RCL_CLIENT) &&
                    req_capsule_get_size(pill, &RMF_CAPA1, RCL_CLIENT) > 0) {
                        lc = req_capsule_client_get(pill, &RMF_CAPA1);
                if (req_capsule_has_field(pill, &RMF_CAPA1, RCL_CLIENT) &&
                    req_capsule_get_size(pill, &RMF_CAPA1, RCL_CLIENT) > 0) {
                        lc = req_capsule_client_get(pill, &RMF_CAPA1);
-                       mdt_set_capainfo(mti, 0, &tsi->tsi_mdt_body->fid1, lc);
+                       mdt_set_capainfo(mti, 0, &tsi->tsi_mdt_body->mbo_fid1,
+                                        lc);
                }
        }
        mti->mti_body = tsi->tsi_mdt_body;
                }
        }
        mti->mti_body = tsi->tsi_mdt_body;
@@ -3194,9 +3198,9 @@ static int mdt_intent_getattr(enum mdt_it_code opcode,
         repbody = req_capsule_server_get(info->mti_pill, &RMF_MDT_BODY);
         LASSERT(repbody);
 
         repbody = req_capsule_server_get(info->mti_pill, &RMF_MDT_BODY);
         LASSERT(repbody);
 
-        info->mti_cross_ref = !!(reqbody->valid & OBD_MD_FLCROSSREF);
-        repbody->eadatasize = 0;
-        repbody->aclsize = 0;
+       info->mti_cross_ref = !!(reqbody->mbo_valid & OBD_MD_FLCROSSREF);
+       repbody->mbo_eadatasize = 0;
+       repbody->mbo_aclsize = 0;
 
         switch (opcode) {
         case MDT_IT_LOOKUP:
 
         switch (opcode) {
         case MDT_IT_LOOKUP:
index 75c2024..e593bff 100644 (file)
@@ -225,7 +225,7 @@ int mdt_hsm_state_get(struct tgt_session_info *tsi)
                GOTO(out_unlock, rc);
 
        if (req_capsule_get_size(info->mti_pill, &RMF_CAPA1, RCL_CLIENT))
                GOTO(out_unlock, rc);
 
        if (req_capsule_get_size(info->mti_pill, &RMF_CAPA1, RCL_CLIENT))
-               mdt_set_capainfo(info, 0, &info->mti_body->fid1,
+               mdt_set_capainfo(info, 0, &info->mti_body->mbo_fid1,
                                 req_capsule_client_get(info->mti_pill,
                                 &RMF_CAPA1));
 
                                 req_capsule_client_get(info->mti_pill,
                                 &RMF_CAPA1));
 
@@ -285,7 +285,7 @@ int mdt_hsm_state_set(struct tgt_session_info *tsi)
                GOTO(out_ucred, rc);
 
        if (req_capsule_get_size(info->mti_pill, &RMF_CAPA1, RCL_CLIENT))
                GOTO(out_ucred, rc);
 
        if (req_capsule_get_size(info->mti_pill, &RMF_CAPA1, RCL_CLIENT))
-               mdt_set_capainfo(info, 0, &info->mti_body->fid1,
+               mdt_set_capainfo(info, 0, &info->mti_body->mbo_fid1,
                            req_capsule_client_get(info->mti_pill, &RMF_CAPA1));
 
        /* Non-root users are forbidden to set or clear flags which are
                            req_capsule_client_get(info->mti_pill, &RMF_CAPA1));
 
        /* Non-root users are forbidden to set or clear flags which are
@@ -312,7 +312,7 @@ int mdt_hsm_state_set(struct tgt_session_info *tsi)
                if (!(ma->ma_hsm.mh_flags & HS_EXISTS)) {
                        CDEBUG(D_HSM, "Could not set an archive number for "
                               DFID "if HSM EXISTS flag is not set.\n",
                if (!(ma->ma_hsm.mh_flags & HS_EXISTS)) {
                        CDEBUG(D_HSM, "Could not set an archive number for "
                               DFID "if HSM EXISTS flag is not set.\n",
-                              PFID(&info->mti_body->fid1));
+                              PFID(&info->mti_body->mbo_fid1));
                        GOTO(out_unlock, rc);
                }
                ma->ma_hsm.mh_arch_id = hss->hss_archive_id;
                        GOTO(out_unlock, rc);
                }
                ma->ma_hsm.mh_arch_id = hss->hss_archive_id;
@@ -331,7 +331,7 @@ int mdt_hsm_state_set(struct tgt_session_info *tsi)
            (flags & HS_LOST     && !(flags & HS_ARCHIVED))) {
                CDEBUG(D_HSM, "Incompatible flag change on "DFID
                              "flags="LPX64"\n",
            (flags & HS_LOST     && !(flags & HS_ARCHIVED))) {
                CDEBUG(D_HSM, "Incompatible flag change on "DFID
                              "flags="LPX64"\n",
-                      PFID(&info->mti_body->fid1), flags);
+                      PFID(&info->mti_body->mbo_fid1), flags);
                GOTO(out_ucred, rc = -EINVAL);
        }
 
                GOTO(out_ucred, rc = -EINVAL);
        }
 
@@ -382,7 +382,7 @@ int mdt_hsm_action(struct tgt_session_info *tsi)
                GOTO(out, rc = err_serious(rc));
 
        if (req_capsule_get_size(tsi->tsi_pill, &RMF_CAPA1, RCL_CLIENT))
                GOTO(out, rc = err_serious(rc));
 
        if (req_capsule_get_size(tsi->tsi_pill, &RMF_CAPA1, RCL_CLIENT))
-               mdt_set_capainfo(info, 0, &info->mti_body->fid1,
+               mdt_set_capainfo(info, 0, &info->mti_body->mbo_fid1,
                                 req_capsule_client_get(info->mti_pill,
                                                        &RMF_CAPA1));
 
                                 req_capsule_client_get(info->mti_pill,
                                                        &RMF_CAPA1));
 
@@ -405,7 +405,7 @@ int mdt_hsm_action(struct tgt_session_info *tsi)
        hai->hai_action = HSMA_NONE;
        hai->hai_cookie = 0;
        hai->hai_gid = 0;
        hai->hai_action = HSMA_NONE;
        hai->hai_cookie = 0;
        hai->hai_gid = 0;
-       hai->hai_fid = info->mti_body->fid1;
+       hai->hai_fid = info->mti_body->mbo_fid1;
        hai->hai_len = sizeof(*hai);
 
        rc = mdt_hsm_get_actions(info, hal);
        hai->hai_len = sizeof(*hai);
 
        rc = mdt_hsm_get_actions(info, hal);
index 17295ee..f49c6dd 100644 (file)
@@ -279,30 +279,34 @@ void mdt_body_reverse_idmap(struct mdt_thread_info *info, struct mdt_body *body)
         if (!exp_connect_rmtclient(info->mti_exp))
                 return;
 
         if (!exp_connect_rmtclient(info->mti_exp))
                 return;
 
-        if (body->valid & OBD_MD_FLUID) {
-                uid_t uid = lustre_idmap_lookup_uid(uc, idmap, 1, body->uid);
-
-                if (uid == CFS_IDMAP_NOTFOUND) {
-                        uid = NOBODY_UID;
-                        if (body->valid & OBD_MD_FLMODE)
-                                body->mode = (body->mode & ~S_IRWXU) |
-                                             ((body->mode & S_IRWXO) << 6);
-                }
+       if (body->mbo_valid & OBD_MD_FLUID) {
+               uid_t uid;
 
 
-                body->uid = uid;
-        }
+               uid = lustre_idmap_lookup_uid(uc, idmap, 1, body->mbo_uid);
 
 
-        if (body->valid & OBD_MD_FLGID) {
-                gid_t gid = lustre_idmap_lookup_gid(uc, idmap, 1, body->gid);
+               if (uid == CFS_IDMAP_NOTFOUND) {
+                       uid = NOBODY_UID;
+                       if (body->mbo_valid & OBD_MD_FLMODE)
+                               body->mbo_mode = (body->mbo_mode & ~S_IRWXU) |
+                                            ((body->mbo_mode & S_IRWXO) << 6);
+               }
 
 
-                if (gid == CFS_IDMAP_NOTFOUND) {
-                        gid = NOBODY_GID;
-                        if (body->valid & OBD_MD_FLMODE)
-                                body->mode = (body->mode & ~S_IRWXG) |
-                                             ((body->mode & S_IRWXO) << 3);
-                }
+               body->mbo_uid = uid;
+       }
+
+       if (body->mbo_valid & OBD_MD_FLGID) {
+               gid_t gid;
+
+               gid = lustre_idmap_lookup_gid(uc, idmap, 1, body->mbo_gid);
+
+               if (gid == CFS_IDMAP_NOTFOUND) {
+                       gid = NOBODY_GID;
+                       if (body->mbo_valid & OBD_MD_FLMODE)
+                               body->mbo_mode = (body->mbo_mode & ~S_IRWXG) |
+                                            ((body->mbo_mode & S_IRWXO) << 3);
+               }
 
 
-                body->gid = gid;
+               body->mbo_gid = gid;
         }
 }
 
         }
 }
 
index fa1d9ff..574a8f9 100644 (file)
@@ -155,7 +155,7 @@ static int new_init_ucred(struct mdt_thread_info *info, ucred_init_type_t type,
        if (type == BODY_INIT) {
                struct mdt_body *body = (struct mdt_body *)buf;
 
        if (type == BODY_INIT) {
                struct mdt_body *body = (struct mdt_body *)buf;
 
-               ucred->uc_suppgids[0] = body->suppgid;
+               ucred->uc_suppgids[0] = body->mbo_suppgid;
                ucred->uc_suppgids[1] = -1;
        }
 
                ucred->uc_suppgids[1] = -1;
        }
 
@@ -421,11 +421,11 @@ static int old_init_ucred(struct mdt_thread_info *info,
 
        LASSERT(uc != NULL);
        uc->uc_valid = UCRED_INVALID;
 
        LASSERT(uc != NULL);
        uc->uc_valid = UCRED_INVALID;
-       uc->uc_o_uid = uc->uc_uid = body->uid;
-       uc->uc_o_gid = uc->uc_gid = body->gid;
-       uc->uc_o_fsuid = uc->uc_fsuid = body->fsuid;
-       uc->uc_o_fsgid = uc->uc_fsgid = body->fsgid;
-       uc->uc_suppgids[0] = body->suppgid;
+       uc->uc_o_uid = uc->uc_uid = body->mbo_uid;
+       uc->uc_o_gid = uc->uc_gid = body->mbo_gid;
+       uc->uc_o_fsuid = uc->uc_fsuid = body->mbo_fsuid;
+       uc->uc_o_fsgid = uc->uc_fsgid = body->mbo_fsgid;
+       uc->uc_suppgids[0] = body->mbo_suppgid;
        uc->uc_suppgids[1] = -1;
        uc->uc_ginfo = NULL;
        if (!is_identity_get_disabled(mdt->mdt_identity_cache)) {
        uc->uc_suppgids[1] = -1;
        uc->uc_ginfo = NULL;
        if (!is_identity_get_disabled(mdt->mdt_identity_cache)) {
@@ -448,9 +448,9 @@ static int old_init_ucred(struct mdt_thread_info *info,
 
        /* remove fs privilege for non-root user. */
        if (uc->uc_fsuid)
 
        /* remove fs privilege for non-root user. */
        if (uc->uc_fsuid)
-               uc->uc_cap = body->capability & ~CFS_CAP_FS_MASK;
+               uc->uc_cap = body->mbo_capability & ~CFS_CAP_FS_MASK;
        else
        else
-               uc->uc_cap = body->capability;
+               uc->uc_cap = body->mbo_capability;
        uc->uc_valid = UCRED_OLD;
 
        RETURN(0);
        uc->uc_valid = UCRED_OLD;
 
        RETURN(0);
@@ -601,12 +601,13 @@ int mdt_fix_reply(struct mdt_thread_info *info)
         body = req_capsule_server_get(pill, &RMF_MDT_BODY);
         LASSERT(body != NULL);
 
         body = req_capsule_server_get(pill, &RMF_MDT_BODY);
         LASSERT(body != NULL);
 
-        if (body->valid & (OBD_MD_FLDIREA | OBD_MD_FLEASIZE | OBD_MD_LINKNAME))
-                md_size = body->eadatasize;
-        else
-                md_size = 0;
+       if (body->mbo_valid & (OBD_MD_FLDIREA | OBD_MD_FLEASIZE |
+                              OBD_MD_LINKNAME))
+               md_size = body->mbo_eadatasize;
+       else
+               md_size = 0;
 
 
-        acl_size = body->aclsize;
+       acl_size = body->mbo_aclsize;
 
         /* this replay - not send info to client */
        if (info->mti_spec.no_create) {
 
         /* this replay - not send info to client */
        if (info->mti_spec.no_create) {
@@ -615,10 +616,10 @@ int mdt_fix_reply(struct mdt_thread_info *info)
        }
 
         CDEBUG(D_INFO, "Shrink to md_size = %d cookie/acl_size = %d"
        }
 
         CDEBUG(D_INFO, "Shrink to md_size = %d cookie/acl_size = %d"
-                        " MDSCAPA = %llx, OSSCAPA = %llx\n",
-                        md_size, acl_size,
-                        (unsigned long long)(body->valid & OBD_MD_FLMDSCAPA),
-                        (unsigned long long)(body->valid & OBD_MD_FLOSSCAPA));
+              " MDSCAPA = %llx, OSSCAPA = %llx\n",
+              md_size, acl_size,
+              (unsigned long long)(body->mbo_valid & OBD_MD_FLMDSCAPA),
+              (unsigned long long)(body->mbo_valid & OBD_MD_FLOSSCAPA));
 /*
             &RMF_MDT_BODY,
             &RMF_MDT_MD,
 /*
             &RMF_MDT_BODY,
             &RMF_MDT_MD,
@@ -657,12 +658,12 @@ int mdt_fix_reply(struct mdt_thread_info *info)
                                    acl_size, RCL_SERVER);
 
         if (req_capsule_has_field(pill, &RMF_CAPA1, RCL_SERVER) &&
                                    acl_size, RCL_SERVER);
 
         if (req_capsule_has_field(pill, &RMF_CAPA1, RCL_SERVER) &&
-            !(body->valid & OBD_MD_FLMDSCAPA))
-                req_capsule_shrink(pill, &RMF_CAPA1, 0, RCL_SERVER);
+           !(body->mbo_valid & OBD_MD_FLMDSCAPA))
+               req_capsule_shrink(pill, &RMF_CAPA1, 0, RCL_SERVER);
 
 
-        if (req_capsule_has_field(pill, &RMF_CAPA2, RCL_SERVER) &&
-            !(body->valid & OBD_MD_FLOSSCAPA))
-                req_capsule_shrink(pill, &RMF_CAPA2, 0, RCL_SERVER);
+       if (req_capsule_has_field(pill, &RMF_CAPA2, RCL_SERVER) &&
+           !(body->mbo_valid & OBD_MD_FLOSSCAPA))
+               req_capsule_shrink(pill, &RMF_CAPA2, 0, RCL_SERVER);
 
         /*
          * Some more field should be shrinked if needed.
 
         /*
          * Some more field should be shrinked if needed.
@@ -681,7 +682,7 @@ int mdt_fix_reply(struct mdt_thread_info *info)
                         /* we can't answer with proper LOV EA, drop flags,
                          * the rc is also returned so this request is
                          * considered as failed */
                         /* we can't answer with proper LOV EA, drop flags,
                          * the rc is also returned so this request is
                          * considered as failed */
-                        body->valid &= ~(OBD_MD_FLDIREA | OBD_MD_FLEASIZE);
+                       body->mbo_valid &= ~(OBD_MD_FLDIREA | OBD_MD_FLEASIZE);
                         /* don't return transno along with error */
                         lustre_msg_set_transno(pill->rc_req->rq_repmsg, 0);
                 } else {
                         /* don't return transno along with error */
                         lustre_msg_set_transno(pill->rc_req->rq_repmsg, 0);
                 } else {
@@ -731,11 +732,11 @@ int mdt_handle_last_unlink(struct mdt_thread_info *info, struct mdt_object *mo,
                CERROR("No need in LOV EA upon unlink\n");
                dump_stack();
         }
                CERROR("No need in LOV EA upon unlink\n");
                dump_stack();
         }
-       repbody->eadatasize = 0;
+       repbody->mbo_eadatasize = 0;
 
        if (info->mti_mdt->mdt_lut.lut_oss_capa &&
            exp_connect_flags(info->mti_exp) & OBD_CONNECT_OSS_CAPA &&
 
        if (info->mti_mdt->mdt_lut.lut_oss_capa &&
            exp_connect_flags(info->mti_exp) & OBD_CONNECT_OSS_CAPA &&
-           repbody->valid & OBD_MD_FLEASIZE) {
+           repbody->mbo_valid & OBD_MD_FLEASIZE) {
                 struct lustre_capa *capa;
 
                 capa = req_capsule_server_get(info->mti_pill, &RMF_CAPA2);
                 struct lustre_capa *capa;
 
                 capa = req_capsule_server_get(info->mti_pill, &RMF_CAPA2);
@@ -745,7 +746,7 @@ int mdt_handle_last_unlink(struct mdt_thread_info *info, struct mdt_object *mo,
                 if (rc)
                         RETURN(rc);
 
                 if (rc)
                         RETURN(rc);
 
-                repbody->valid |= OBD_MD_FLOSSCAPA;
+               repbody->mbo_valid |= OBD_MD_FLOSSCAPA;
         }
 
         RETURN(0);
         }
 
         RETURN(0);
index 62933b8..fd54c2a 100644 (file)
@@ -418,7 +418,7 @@ static inline int mdt_ioepoch_close_reg(struct mdt_thread_info *info,
         if (ret == MDT_IOEPOCH_GETATTR && recovery) {
                 struct mdt_body *rep;
                 rep = req_capsule_server_get(info->mti_pill, &RMF_MDT_BODY);
         if (ret == MDT_IOEPOCH_GETATTR && recovery) {
                 struct mdt_body *rep;
                 rep = req_capsule_server_get(info->mti_pill, &RMF_MDT_BODY);
-                rep->valid |= OBD_MD_FLGETATTRLOCK;
+               rep->mbo_valid |= OBD_MD_FLGETATTRLOCK;
         }
 
         RETURN(rc ? : ret);
         }
 
         RETURN(rc ? : ret);
@@ -729,25 +729,25 @@ static int mdt_mfd_open(struct mdt_thread_info *info, struct mdt_object *p,
 
         if (ma->ma_valid & MA_LOV) {
                 LASSERT(ma->ma_lmm_size != 0);
 
         if (ma->ma_valid & MA_LOV) {
                 LASSERT(ma->ma_lmm_size != 0);
-                repbody->eadatasize = ma->ma_lmm_size;
-                if (isdir)
-                        repbody->valid |= OBD_MD_FLDIREA;
-                else
-                        repbody->valid |= OBD_MD_FLEASIZE;
-        }
+               repbody->mbo_eadatasize = ma->ma_lmm_size;
+               if (isdir)
+                       repbody->mbo_valid |= OBD_MD_FLDIREA;
+               else
+                       repbody->mbo_valid |= OBD_MD_FLEASIZE;
+       }
 
        if (ma->ma_valid & MA_LMV) {
                LASSERT(ma->ma_lmv_size != 0);
 
        if (ma->ma_valid & MA_LMV) {
                LASSERT(ma->ma_lmv_size != 0);
-               repbody->eadatasize = ma->ma_lmv_size;
+               repbody->mbo_eadatasize = ma->ma_lmv_size;
                LASSERT(isdir);
                LASSERT(isdir);
-               repbody->valid |= OBD_MD_FLDIREA | OBD_MD_MEA;
+               repbody->mbo_valid |= OBD_MD_FLDIREA | OBD_MD_MEA;
        }
 
        }
 
-        if (flags & FMODE_WRITE) {
-                rc = mdt_write_get(o);
-                if (rc == 0) {
-                        mdt_ioepoch_open(info, o, created);
-                        repbody->ioepoch = o->mot_ioepoch;
+       if (flags & FMODE_WRITE) {
+               rc = mdt_write_get(o);
+               if (rc == 0) {
+                       mdt_ioepoch_open(info, o, created);
+                       repbody->mbo_ioepoch = o->mot_ioepoch;
                 }
         } else if (flags & MDS_FMODE_EXEC) {
                rc = mdt_write_deny(o);
                 }
         } else if (flags & MDS_FMODE_EXEC) {
                rc = mdt_write_deny(o);
@@ -825,7 +825,7 @@ static int mdt_mfd_open(struct mdt_thread_info *info, struct mdt_object *p,
                mfd->mfd_old_handle.cookie = info->mti_rr.rr_handle->cookie;
        }
 
                mfd->mfd_old_handle.cookie = info->mti_rr.rr_handle->cookie;
        }
 
-       repbody->handle.cookie = mfd->mfd_handle.h_cookie;
+       repbody->mbo_handle.cookie = mfd->mfd_handle.h_cookie;
 
        if (req->rq_export->exp_disconnected) {
                spin_lock(&med->med_open_lock);
 
        if (req->rq_export->exp_disconnected) {
                spin_lock(&med->med_open_lock);
@@ -899,11 +899,11 @@ int mdt_finish_open(struct mdt_thread_info *info,
 
                 rc = mdt_pack_remote_perm(info, o, buf);
                 if (rc) {
 
                 rc = mdt_pack_remote_perm(info, o, buf);
                 if (rc) {
-                        repbody->valid &= ~OBD_MD_FLRMTPERM;
-                        repbody->aclsize = 0;
-                } else {
-                        repbody->valid |= OBD_MD_FLRMTPERM;
-                        repbody->aclsize = sizeof(struct mdt_remote_perm);
+                       repbody->mbo_valid &= ~OBD_MD_FLRMTPERM;
+                       repbody->mbo_aclsize = 0;
+               } else {
+                       repbody->mbo_valid |= OBD_MD_FLRMTPERM;
+                       repbody->mbo_aclsize = sizeof(struct mdt_remote_perm);
                 }
         }
 #ifdef CONFIG_FS_POSIX_ACL
                 }
         }
 #ifdef CONFIG_FS_POSIX_ACL
@@ -920,8 +920,8 @@ int mdt_finish_open(struct mdt_thread_info *info,
                                           XATTR_NAME_ACL_ACCESS);
                         if (rc < 0) {
                                 if (rc == -ENODATA) {
                                           XATTR_NAME_ACL_ACCESS);
                         if (rc < 0) {
                                 if (rc == -ENODATA) {
-                                        repbody->aclsize = 0;
-                                        repbody->valid |= OBD_MD_FLACL;
+                                       repbody->mbo_aclsize = 0;
+                                       repbody->mbo_valid |= OBD_MD_FLACL;
                                         rc = 0;
                                 } else if (rc == -EOPNOTSUPP) {
                                         rc = 0;
                                         rc = 0;
                                 } else if (rc == -EOPNOTSUPP) {
                                         rc = 0;
@@ -929,8 +929,8 @@ int mdt_finish_open(struct mdt_thread_info *info,
                                         CERROR("got acl size: %d\n", rc);
                                 }
                         } else {
                                         CERROR("got acl size: %d\n", rc);
                                 }
                         } else {
-                                repbody->aclsize = rc;
-                                repbody->valid |= OBD_MD_FLACL;
+                               repbody->mbo_aclsize = rc;
+                               repbody->mbo_valid |= OBD_MD_FLACL;
                                 rc = 0;
                         }
                 }
                                 rc = 0;
                         }
                 }
@@ -947,7 +947,7 @@ int mdt_finish_open(struct mdt_thread_info *info,
                 rc = mo_capa_get(info->mti_env, mdt_object_child(o), capa, 0);
                 if (rc)
                         RETURN(rc);
                 rc = mo_capa_get(info->mti_env, mdt_object_child(o), capa, 0);
                 if (rc)
                         RETURN(rc);
-                repbody->valid |= OBD_MD_FLMDSCAPA;
+               repbody->mbo_valid |= OBD_MD_FLMDSCAPA;
         }
        if (info->mti_mdt->mdt_lut.lut_oss_capa &&
            exp_connect_flags(exp) & OBD_CONNECT_OSS_CAPA &&
         }
        if (info->mti_mdt->mdt_lut.lut_oss_capa &&
            exp_connect_flags(exp) & OBD_CONNECT_OSS_CAPA &&
@@ -960,7 +960,7 @@ int mdt_finish_open(struct mdt_thread_info *info,
                 rc = mo_capa_get(info->mti_env, mdt_object_child(o), capa, 0);
                 if (rc)
                         RETURN(rc);
                 rc = mo_capa_get(info->mti_env, mdt_object_child(o), capa, 0);
                 if (rc)
                         RETURN(rc);
-                repbody->valid |= OBD_MD_FLOSSCAPA;
+               repbody->mbo_valid |= OBD_MD_FLOSSCAPA;
         }
 
         /*
         }
 
         /*
@@ -1006,15 +1006,15 @@ int mdt_finish_open(struct mdt_thread_info *info,
                spin_unlock(&med->med_open_lock);
 
                 if (mfd != NULL) {
                spin_unlock(&med->med_open_lock);
 
                 if (mfd != NULL) {
-                        repbody->handle.cookie = mfd->mfd_handle.h_cookie;
-                        /*set repbody->ea_size for resent case*/
-                        if (ma->ma_valid & MA_LOV) {
-                                LASSERT(ma->ma_lmm_size != 0);
-                                repbody->eadatasize = ma->ma_lmm_size;
-                                if (isdir)
-                                        repbody->valid |= OBD_MD_FLDIREA;
-                                else
-                                        repbody->valid |= OBD_MD_FLEASIZE;
+                       repbody->mbo_handle.cookie = mfd->mfd_handle.h_cookie;
+                       /* set repbody->ea_size for resent case */
+                       if (ma->ma_valid & MA_LOV) {
+                               LASSERT(ma->ma_lmm_size != 0);
+                               repbody->mbo_eadatasize = ma->ma_lmm_size;
+                               if (isdir)
+                                       repbody->mbo_valid |= OBD_MD_FLDIREA;
+                               else
+                                       repbody->mbo_valid |= OBD_MD_FLEASIZE;
                         }
                        mdt_set_disposition(info, rep, DISP_OPEN_OPEN);
                        RETURN(0);
                         }
                        mdt_set_disposition(info, rep, DISP_OPEN_OPEN);
                        RETURN(0);
@@ -1107,8 +1107,8 @@ void mdt_reconstruct_open(struct mdt_thread_info *info,
                                mdt_object_put(env, child);
                                GOTO(out, rc = -EIO);
                        }
                                mdt_object_put(env, child);
                                GOTO(out, rc = -EIO);
                        }
-                       repbody->fid1 = *rr->rr_fid2;
-                       repbody->valid |= (OBD_MD_FLID | OBD_MD_MDS);
+                       repbody->mbo_fid1 = *rr->rr_fid2;
+                       repbody->mbo_valid |= (OBD_MD_FLID | OBD_MD_MDS);
                        rc = 0;
                } else {
                        if (mdt_object_exists(child)) {
                        rc = 0;
                } else {
                        if (mdt_object_exists(child)) {
@@ -1165,8 +1165,8 @@ int mdt_open_by_fid(struct mdt_thread_info *info, struct ldlm_reply *rep)
                                                DISP_LOOKUP_EXECD |
                                                DISP_LOOKUP_POS));
                 repbody = req_capsule_server_get(info->mti_pill, &RMF_MDT_BODY);
                                                DISP_LOOKUP_EXECD |
                                                DISP_LOOKUP_POS));
                 repbody = req_capsule_server_get(info->mti_pill, &RMF_MDT_BODY);
-                repbody->fid1 = *rr->rr_fid2;
-                repbody->valid |= (OBD_MD_FLID | OBD_MD_MDS);
+               repbody->mbo_fid1 = *rr->rr_fid2;
+               repbody->mbo_valid |= (OBD_MD_FLID | OBD_MD_MDS);
                 rc = 0;
        } else {
                if (mdt_object_exists(o)) {
                 rc = 0;
        } else {
                if (mdt_object_exists(o)) {
@@ -1834,8 +1834,8 @@ int mdt_reint_open(struct mdt_thread_info *info, struct mdt_lock_handle *lhc)
                                                      MDS_INODELOCK_LOOKUP,
                                                      MDT_CROSS_LOCK);
                         }
                                                      MDS_INODELOCK_LOOKUP,
                                                      MDT_CROSS_LOCK);
                         }
-                        repbody->fid1 = *mdt_object_fid(child);
-                        repbody->valid |= (OBD_MD_FLID | OBD_MD_MDS);
+                       repbody->mbo_fid1 = *mdt_object_fid(child);
+                       repbody->mbo_valid |= (OBD_MD_FLID | OBD_MD_MDS);
                         if (rc != 0)
                                 result = rc;
                        else
                         if (rc != 0)
                                 result = rc;
                        else
@@ -2163,7 +2163,7 @@ out_unlock:
                struct mdt_body *repbody;
                repbody = req_capsule_server_get(info->mti_pill, &RMF_MDT_BODY);
                LASSERT(repbody != NULL);
                struct mdt_body *repbody;
                repbody = req_capsule_server_get(info->mti_pill, &RMF_MDT_BODY);
                LASSERT(repbody != NULL);
-               repbody->valid |= OBD_MD_FLRELEASED;
+               repbody->mbo_valid |= OBD_MD_FLRELEASED;
        }
 
 out_reprocess:
        }
 
 out_reprocess:
@@ -2320,8 +2320,8 @@ int mdt_close(struct tgt_session_info *tsi)
                                                        &RMF_MDT_MD,
                                                        RCL_SERVER);
                 ma->ma_need = MA_INODE | MA_LOV | MA_COOKIE;
                                                        &RMF_MDT_MD,
                                                        RCL_SERVER);
                 ma->ma_need = MA_INODE | MA_LOV | MA_COOKIE;
-                repbody->eadatasize = 0;
-                repbody->aclsize = 0;
+               repbody->mbo_eadatasize = 0;
+               repbody->mbo_aclsize = 0;
         } else {
                 rc = err_serious(rc);
         }
         } else {
                 rc = err_serious(rc);
         }
@@ -2391,8 +2391,8 @@ int mdt_done_writing(struct tgt_session_info *tsi)
                GOTO(out, rc = err_serious(rc));
 
        repbody = req_capsule_server_get(tsi->tsi_pill, &RMF_MDT_BODY);
                GOTO(out, rc = err_serious(rc));
 
        repbody = req_capsule_server_get(tsi->tsi_pill, &RMF_MDT_BODY);
-       repbody->eadatasize = 0;
-       repbody->aclsize = 0;
+       repbody->mbo_eadatasize = 0;
+       repbody->mbo_aclsize = 0;
 
        /* Done Writing may come with the Size-on-MDS update. Unpack it. */
        rc = mdt_close_unpack(info);
 
        /* Done Writing may come with the Size-on-MDS update. Unpack it. */
        rc = mdt_close_unpack(info);
index fba53bf..f3e6884 100644 (file)
@@ -273,7 +273,7 @@ static void mdt_reconstruct_create(struct mdt_thread_info *mti,
                        rc = -EIO;
 
                req->rq_status = rc;
                        rc = -EIO;
 
                req->rq_status = rc;
-               body->valid |= OBD_MD_MDS;
+               body->mbo_valid |= OBD_MD_MDS;
        }
        mdt_pack_attr2body(mti, body, &mti->mti_attr.ma_attr,
                           mdt_object_fid(child));
        }
        mdt_pack_attr2body(mti, body, &mti->mti_attr.ma_attr,
                           mdt_object_fid(child));
@@ -318,7 +318,7 @@ static void mdt_reconstruct_setattr(struct mdt_thread_info *mti,
                 struct mdt_body *repbody;
 
                 repbody = req_capsule_server_get(mti->mti_pill, &RMF_MDT_BODY);
                 struct mdt_body *repbody;
 
                 repbody = req_capsule_server_get(mti->mti_pill, &RMF_MDT_BODY);
-                repbody->ioepoch = obj->mot_ioepoch;
+               repbody->mbo_ioepoch = obj->mot_ioepoch;
                spin_lock(&med->med_open_lock);
                cfs_list_for_each_entry(mfd, &med->med_open_head, mfd_list) {
                        if (mfd->mfd_xid == req->rq_xid)
                spin_lock(&med->med_open_lock);
                cfs_list_for_each_entry(mfd, &med->med_open_head, mfd_list) {
                        if (mfd->mfd_xid == req->rq_xid)
@@ -326,7 +326,7 @@ static void mdt_reconstruct_setattr(struct mdt_thread_info *mti,
                }
                LASSERT(&mfd->mfd_list != &med->med_open_head);
                spin_unlock(&med->med_open_lock);
                }
                LASSERT(&mfd->mfd_list != &med->med_open_head);
                spin_unlock(&med->med_open_lock);
-               repbody->handle.cookie = mfd->mfd_handle.h_cookie;
+               repbody->mbo_handle.cookie = mfd->mfd_handle.h_cookie;
        }
 
        mdt_object_put(mti->mti_env, obj);
        }
 
        mdt_object_put(mti->mti_env, obj);
index 6141ec9..e76bf9d 100644 (file)
@@ -64,7 +64,7 @@ static int mdt_create_pack_capa(struct mdt_thread_info *info, int rc,
 
         /* for cross-ref mkdir, mds capa has been fetched from remote obj, then
          * we won't go to below*/
 
         /* for cross-ref mkdir, mds capa has been fetched from remote obj, then
          * we won't go to below*/
-        if (repbody->valid & OBD_MD_FLMDSCAPA)
+       if (repbody->mbo_valid & OBD_MD_FLMDSCAPA)
                 RETURN(rc);
 
        if (rc == 0 && info->mti_mdt->mdt_lut.lut_mds_capa &&
                 RETURN(rc);
 
        if (rc == 0 && info->mti_mdt->mdt_lut.lut_mds_capa &&
@@ -77,7 +77,7 @@ static int mdt_create_pack_capa(struct mdt_thread_info *info, int rc,
                 rc = mo_capa_get(info->mti_env, mdt_object_child(object), capa,
                                  0);
                 if (rc == 0)
                 rc = mo_capa_get(info->mti_env, mdt_object_child(object), capa,
                                  0);
                 if (rc == 0)
-                        repbody->valid |= OBD_MD_FLMDSCAPA;
+                       repbody->mbo_valid |= OBD_MD_FLMDSCAPA;
         }
 
         RETURN(rc);
         }
 
         RETURN(rc);
@@ -699,7 +699,7 @@ static int mdt_reint_setattr(struct mdt_thread_info *info,
                 }
 
                 mdt_ioepoch_open(info, mo, 0);
                 }
 
                 mdt_ioepoch_open(info, mo, 0);
-                repbody->ioepoch = mo->mot_ioepoch;
+               repbody->mbo_ioepoch = mo->mot_ioepoch;
 
                 mdt_object_get(info->mti_env, mo);
                 mdt_mfd_set_mode(mfd, MDS_FMODE_TRUNC);
 
                 mdt_object_get(info->mti_env, mo);
                 mdt_mfd_set_mode(mfd, MDS_FMODE_TRUNC);
@@ -709,7 +709,7 @@ static int mdt_reint_setattr(struct mdt_thread_info *info,
                spin_lock(&med->med_open_lock);
                cfs_list_add(&mfd->mfd_list, &med->med_open_head);
                spin_unlock(&med->med_open_lock);
                spin_lock(&med->med_open_lock);
                cfs_list_add(&mfd->mfd_list, &med->med_open_head);
                spin_unlock(&med->med_open_lock);
-                repbody->handle.cookie = mfd->mfd_handle.h_cookie;
+               repbody->mbo_handle.cookie = mfd->mfd_handle.h_cookie;
         }
 
         som_au = info->mti_ioepoch && info->mti_ioepoch->flags & MF_SOM_CHANGE;
         }
 
         som_au = info->mti_ioepoch && info->mti_ioepoch->flags & MF_SOM_CHANGE;
@@ -789,7 +789,7 @@ static int mdt_reint_setattr(struct mdt_thread_info *info,
                 rc = mo_capa_get(info->mti_env, mdt_object_child(mo), capa, 0);
                 if (rc)
                         GOTO(out_put, rc);
                 rc = mo_capa_get(info->mti_env, mdt_object_child(mo), capa, 0);
                 if (rc)
                         GOTO(out_put, rc);
-                repbody->valid |= OBD_MD_FLOSSCAPA;
+               repbody->mbo_valid |= OBD_MD_FLOSSCAPA;
         }
 
         EXIT;
         }
 
         EXIT;
@@ -985,8 +985,8 @@ static int mdt_reint_unlink(struct mdt_thread_info *info,
                                MDT_CROSS_LOCK);
                repbody = req_capsule_server_get(info->mti_pill, &RMF_MDT_BODY);
                LASSERT(repbody != NULL);
                                MDT_CROSS_LOCK);
                repbody = req_capsule_server_get(info->mti_pill, &RMF_MDT_BODY);
                LASSERT(repbody != NULL);
-               repbody->fid1 = *mdt_object_fid(mc);
-               repbody->valid |= (OBD_MD_FLID | OBD_MD_MDS);
+               repbody->mbo_fid1 = *mdt_object_fid(mc);
+               repbody->mbo_valid |= (OBD_MD_FLID | OBD_MD_MDS);
                GOTO(unlock_child, rc = -EREMOTE);
        } else if (info->mti_spec.sp_rm_entry) {
                rc = -EPERM;
                GOTO(unlock_child, rc = -EREMOTE);
        } else if (info->mti_spec.sp_rm_entry) {
                rc = -EPERM;
index 55f0520..f5a12f9 100644 (file)
@@ -63,7 +63,7 @@ static int mdt_getxattr_pack_reply(struct mdt_thread_info * info)
         if (OBD_FAIL_CHECK(OBD_FAIL_MDS_GETXATTR_PACK))
                 RETURN(-ENOMEM);
 
         if (OBD_FAIL_CHECK(OBD_FAIL_MDS_GETXATTR_PACK))
                 RETURN(-ENOMEM);
 
-       valid = info->mti_body->valid & (OBD_MD_FLXATTR | OBD_MD_FLXATTRLS);
+       valid = info->mti_body->mbo_valid & (OBD_MD_FLXATTR | OBD_MD_FLXATTRLS);
 
         /* Determine how many bytes we need */
         if (valid == OBD_MD_FLXATTR) {
 
         /* Determine how many bytes we need */
         if (valid == OBD_MD_FLXATTR) {
@@ -86,11 +86,12 @@ static int mdt_getxattr_pack_reply(struct mdt_thread_info * info)
                /* N.B. eadatasize = 0 is not valid for FLXATTRALL */
                /* We could calculate accurate sizes, but this would
                 * introduce a lot of overhead, let's do it later... */
                /* N.B. eadatasize = 0 is not valid for FLXATTRALL */
                /* We could calculate accurate sizes, but this would
                 * introduce a lot of overhead, let's do it later... */
-               size = info->mti_body->eadatasize;
+               size = info->mti_body->mbo_eadatasize;
                req_capsule_set_size(pill, &RMF_EAVALS, RCL_SERVER, size);
                req_capsule_set_size(pill, &RMF_EAVALS_LENS, RCL_SERVER, size);
                req_capsule_set_size(pill, &RMF_EAVALS, RCL_SERVER, size);
                req_capsule_set_size(pill, &RMF_EAVALS_LENS, RCL_SERVER, size);
-        } else {
-                CDEBUG(D_INFO, "Valid bits: "LPX64"\n", info->mti_body->valid);
+       } else {
+               CDEBUG(D_INFO, "Valid bits: "LPX64"\n",
+                      info->mti_body->mbo_valid);
                 RETURN(-EINVAL);
         }
 
                 RETURN(-EINVAL);
         }
 
@@ -102,7 +103,7 @@ static int mdt_getxattr_pack_reply(struct mdt_thread_info * info)
         }
 
         req_capsule_set_size(pill, &RMF_EADATA, RCL_SERVER,
         }
 
         req_capsule_set_size(pill, &RMF_EADATA, RCL_SERVER,
-                             info->mti_body->eadatasize == 0 ? 0 : size);
+                            info->mti_body->mbo_eadatasize == 0 ? 0 : size);
         rc = req_capsule_server_pack(pill);
         if (rc) {
                 LASSERT(rc < 0);
         rc = req_capsule_server_pack(pill);
         if (rc) {
                 LASSERT(rc < 0);
@@ -131,10 +132,10 @@ mdt_getxattr_one(struct mdt_thread_info *info,
                GOTO(out, rc);
        }
 
                GOTO(out, rc);
        }
 
-       if (info->mti_body->valid &
+       if (info->mti_body->mbo_valid &
            (OBD_MD_FLRMTLSETFACL | OBD_MD_FLRMTLGETFACL))
                flags = CFS_IC_ALL;
            (OBD_MD_FLRMTLSETFACL | OBD_MD_FLRMTLGETFACL))
                flags = CFS_IC_ALL;
-       else if (info->mti_body->valid & OBD_MD_FLRMTRGETFACL)
+       else if (info->mti_body->mbo_valid & OBD_MD_FLRMTRGETFACL)
                flags = CFS_IC_MAPPED;
 
        if (rc > 0 && flags != CFS_IC_NOTHING) {
                flags = CFS_IC_MAPPED;
 
        if (rc > 0 && flags != CFS_IC_NOTHING) {
@@ -191,7 +192,7 @@ static int mdt_getxattr_all(struct mdt_thread_info *info,
        /* Fill out EAVALS and EAVALS_LENS */
        for (b = eadatahead; b < eadatatail; b += strlen(b) + 1, v += rc) {
                buf->lb_buf = v;
        /* Fill out EAVALS and EAVALS_LENS */
        for (b = eadatahead; b < eadatatail; b += strlen(b) + 1, v += rc) {
                buf->lb_buf = v;
-               buf->lb_len = reqbody->eadatasize - eavallen;
+               buf->lb_len = reqbody->mbo_eadatasize - eavallen;
                rc = mdt_getxattr_one(info, b, next, buf, med, uc);
                if (rc < 0)
                        GOTO(out, rc);
                rc = mdt_getxattr_one(info, b, next, buf, med, uc);
                if (rc < 0)
                        GOTO(out, rc);
@@ -201,8 +202,8 @@ static int mdt_getxattr_all(struct mdt_thread_info *info,
                eavallen += rc;
        }
 
                eavallen += rc;
        }
 
-       repbody->aclsize = eavallen;
-       repbody->max_mdsize = eavallens;
+       repbody->mbo_aclsize = eavallen;
+       repbody->mbo_max_mdsize = eavallens;
 
        req_capsule_shrink(info->mti_pill, &RMF_EAVALS, eavallen, RCL_SERVER);
        req_capsule_shrink(info->mti_pill, &RMF_EAVALS_LENS,
 
        req_capsule_shrink(info->mti_pill, &RMF_EAVALS, eavallen, RCL_SERVER);
        req_capsule_shrink(info->mti_pill, &RMF_EAVALS_LENS,
@@ -232,7 +233,7 @@ int mdt_getxattr(struct mdt_thread_info *info)
         LASSERT(info->mti_object != NULL);
        LASSERT(lu_object_assert_exists(&info->mti_object->mot_obj));
 
         LASSERT(info->mti_object != NULL);
        LASSERT(lu_object_assert_exists(&info->mti_object->mot_obj));
 
-        CDEBUG(D_INODE, "getxattr "DFID"\n", PFID(&info->mti_body->fid1));
+       CDEBUG(D_INODE, "getxattr "DFID"\n", PFID(&info->mti_body->mbo_fid1));
 
         reqbody = req_capsule_client_get(info->mti_pill, &RMF_MDT_BODY);
         if (reqbody == NULL)
 
         reqbody = req_capsule_client_get(info->mti_pill, &RMF_MDT_BODY);
         if (reqbody == NULL)
@@ -244,7 +245,7 @@ int mdt_getxattr(struct mdt_thread_info *info)
 
         next = mdt_object_child(info->mti_object);
 
 
         next = mdt_object_child(info->mti_object);
 
-        if (info->mti_body->valid & OBD_MD_FLRMTRGETFACL) {
+       if (info->mti_body->mbo_valid & OBD_MD_FLRMTRGETFACL) {
                 if (unlikely(!remote))
                         GOTO(out, rc = err_serious(-EINVAL));
 
                 if (unlikely(!remote))
                         GOTO(out, rc = err_serious(-EINVAL));
 
@@ -267,14 +268,14 @@ int mdt_getxattr(struct mdt_thread_info *info)
         LASSERT(repbody != NULL);
 
         /* No need further getxattr. */
         LASSERT(repbody != NULL);
 
         /* No need further getxattr. */
-        if (easize == 0 || reqbody->eadatasize == 0)
-                GOTO(out, rc = easize);
+       if (easize == 0 || reqbody->mbo_eadatasize == 0)
+               GOTO(out, rc = easize);
 
 
-        buf = &info->mti_buf;
-        buf->lb_buf = req_capsule_server_get(info->mti_pill, &RMF_EADATA);
-        buf->lb_len = easize;
+       buf = &info->mti_buf;
+       buf->lb_buf = req_capsule_server_get(info->mti_pill, &RMF_EADATA);
+       buf->lb_len = easize;
 
 
-       valid = info->mti_body->valid & (OBD_MD_FLXATTR | OBD_MD_FLXATTRLS);
+       valid = info->mti_body->mbo_valid & (OBD_MD_FLXATTR | OBD_MD_FLXATTRLS);
 
        if (valid == OBD_MD_FLXATTR) {
                char *xattr_name = req_capsule_client_get(info->mti_pill,
 
        if (valid == OBD_MD_FLXATTR) {
                char *xattr_name = req_capsule_client_get(info->mti_pill,
@@ -296,7 +297,7 @@ int mdt_getxattr(struct mdt_thread_info *info)
 out:
        if (rc >= 0) {
                mdt_counter_incr(req, LPROC_MDT_GETXATTR);
 out:
        if (rc >= 0) {
                mdt_counter_incr(req, LPROC_MDT_GETXATTR);
-               repbody->eadatasize = rc;
+               repbody->mbo_eadatasize = rc;
                rc = 0;
        }
        mdt_exit_ucred(info);
                rc = 0;
        }
        mdt_exit_ucred(info);
index d12885d..05479cc 100644 (file)
@@ -1871,35 +1871,35 @@ EXPORT_SYMBOL(lustre_swab_lquota_lvb);
 
 void lustre_swab_mdt_body (struct mdt_body *b)
 {
 
 void lustre_swab_mdt_body (struct mdt_body *b)
 {
-       lustre_swab_lu_fid(&b->fid1);
-       lustre_swab_lu_fid(&b->fid2);
+       lustre_swab_lu_fid(&b->mbo_fid1);
+       lustre_swab_lu_fid(&b->mbo_fid2);
        /* handle is opaque */
        /* handle is opaque */
-       __swab64s(&b->valid);
-       __swab64s(&b->size);
-       __swab64s(&b->mtime);
-       __swab64s(&b->atime);
-       __swab64s(&b->ctime);
-       __swab64s(&b->blocks);
-       __swab64s(&b->ioepoch);
-       __swab64s(&b->t_state);
-       __swab32s(&b->fsuid);
-       __swab32s(&b->fsgid);
-       __swab32s(&b->capability);
-       __swab32s(&b->mode);
-       __swab32s(&b->uid);
-       __swab32s(&b->gid);
-       __swab32s(&b->flags);
-       __swab32s(&b->rdev);
-       __swab32s(&b->nlink);
-       CLASSERT(offsetof(typeof(*b), unused2) != 0);
-       __swab32s(&b->suppgid);
-       __swab32s(&b->eadatasize);
-       __swab32s(&b->aclsize);
-       __swab32s(&b->max_mdsize);
-       __swab32s(&b->max_cookiesize);
-       __swab32s(&b->uid_h);
-       __swab32s(&b->gid_h);
-       CLASSERT(offsetof(typeof(*b), padding_5) != 0);
+       __swab64s(&b->mbo_valid);
+       __swab64s(&b->mbo_size);
+       __swab64s(&b->mbo_mtime);
+       __swab64s(&b->mbo_atime);
+       __swab64s(&b->mbo_ctime);
+       __swab64s(&b->mbo_blocks);
+       __swab64s(&b->mbo_ioepoch);
+       __swab64s(&b->mbo_t_state);
+       __swab32s(&b->mbo_fsuid);
+       __swab32s(&b->mbo_fsgid);
+       __swab32s(&b->mbo_capability);
+       __swab32s(&b->mbo_mode);
+       __swab32s(&b->mbo_uid);
+       __swab32s(&b->mbo_gid);
+       __swab32s(&b->mbo_flags);
+       __swab32s(&b->mbo_rdev);
+       __swab32s(&b->mbo_nlink);
+       CLASSERT(offsetof(typeof(*b), mbo_unused2) != 0);
+       __swab32s(&b->mbo_suppgid);
+       __swab32s(&b->mbo_eadatasize);
+       __swab32s(&b->mbo_aclsize);
+       __swab32s(&b->mbo_max_mdsize);
+       __swab32s(&b->mbo_max_cookiesize);
+       __swab32s(&b->mbo_uid_h);
+       __swab32s(&b->mbo_gid_h);
+       CLASSERT(offsetof(typeof(*b), mbo_padding_5) != 0);
 }
 EXPORT_SYMBOL(lustre_swab_mdt_body);
 
 }
 EXPORT_SYMBOL(lustre_swab_mdt_body);
 
index d0149f4..2f07137 100644 (file)
@@ -54,8 +54,8 @@ void lustre_assert_wire_constants(void)
 {
         /* Wire protocol assertions generated by 'wirecheck'
          * (make -C lustre/utils newwiretest)
 {
         /* Wire protocol assertions generated by 'wirecheck'
          * (make -C lustre/utils newwiretest)
-         * running on Linux u 2.6.32-431.5.1.el6.lustre.x86_64 #1 SMP Wed Feb 12 11:01:08 CST 2014 x8
-         * with gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)  */
+         * running on Linux t 2.6.32-358.18.1.el6.lustre.x86_64 #1 SMP Mon Sep 2 15:21:03 CDT 2013 x8
+         * with gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)  */
 
 
        /* Constants... */
 
 
        /* Constants... */
@@ -1465,7 +1465,7 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_objects[0]));
        LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects[0]) == 24, "found %lld\n",
                 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects[0]));
                 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_objects[0]));
        LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects[0]) == 24, "found %lld\n",
                 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects[0]));
-       CLASSERT(LOV_MAGIC_V1 == 0x0BD10BD0);
+       CLASSERT(LOV_MAGIC_V1 == (0x0BD10000 | 0x0BD0));
 
        /* Checks for struct lov_mds_md_v3 */
        LASSERTF((int)sizeof(struct lov_mds_md_v3) == 48, "found %lld\n",
 
        /* Checks for struct lov_mds_md_v3 */
        LASSERTF((int)sizeof(struct lov_mds_md_v3) == 48, "found %lld\n",
@@ -1503,7 +1503,7 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct lov_mds_md_v3, lmm_objects[0]));
        LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_objects[0]) == 24, "found %lld\n",
                 (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_objects[0]));
                 (long long)(int)offsetof(struct lov_mds_md_v3, lmm_objects[0]));
        LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_objects[0]) == 24, "found %lld\n",
                 (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_objects[0]));
-       CLASSERT(LOV_MAGIC_V3 == 0x0BD30BD0);
+       CLASSERT(LOV_MAGIC_V3 == (0x0BD30000 | 0x0BD0));
        LASSERTF(LOV_PATTERN_RAID0 == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)LOV_PATTERN_RAID0);
        LASSERTF(LOV_PATTERN_RAID1 == 0x00000002UL, "found 0x%.8xUL\n",
        LASSERTF(LOV_PATTERN_RAID0 == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)LOV_PATTERN_RAID0);
        LASSERTF(LOV_PATTERN_RAID1 == 0x00000002UL, "found 0x%.8xUL\n",
@@ -1919,138 +1919,138 @@ void lustre_assert_wire_constants(void)
        /* Checks for struct mdt_body */
        LASSERTF((int)sizeof(struct mdt_body) == 216, "found %lld\n",
                 (long long)(int)sizeof(struct mdt_body));
        /* Checks for struct mdt_body */
        LASSERTF((int)sizeof(struct mdt_body) == 216, "found %lld\n",
                 (long long)(int)sizeof(struct mdt_body));
-       LASSERTF((int)offsetof(struct mdt_body, fid1) == 0, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, fid1));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->fid1) == 16, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->fid1));
-       LASSERTF((int)offsetof(struct mdt_body, fid2) == 16, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, fid2));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->fid2) == 16, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->fid2));
-       LASSERTF((int)offsetof(struct mdt_body, handle) == 32, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, handle));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->handle) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->handle));
-       LASSERTF((int)offsetof(struct mdt_body, valid) == 40, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, valid));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->valid) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->valid));
-       LASSERTF((int)offsetof(struct mdt_body, size) == 48, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, size));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->size) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->size));
-       LASSERTF((int)offsetof(struct mdt_body, mtime) == 56, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, mtime));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->mtime) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->mtime));
-       LASSERTF((int)offsetof(struct mdt_body, atime) == 64, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, atime));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->atime) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->atime));
-       LASSERTF((int)offsetof(struct mdt_body, ctime) == 72, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, ctime));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->ctime) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->ctime));
-       LASSERTF((int)offsetof(struct mdt_body, blocks) == 80, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, blocks));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->blocks) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->blocks));
-       LASSERTF((int)offsetof(struct mdt_body, t_state) == 96, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, t_state));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->t_state) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->t_state));
-       LASSERTF((int)offsetof(struct mdt_body, fsuid) == 104, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, fsuid));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->fsuid) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->fsuid));
-       LASSERTF((int)offsetof(struct mdt_body, fsgid) == 108, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, fsgid));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->fsgid) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->fsgid));
-       LASSERTF((int)offsetof(struct mdt_body, capability) == 112, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, capability));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->capability) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->capability));
-       LASSERTF((int)offsetof(struct mdt_body, mode) == 116, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, mode));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->mode) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->mode));
-       LASSERTF((int)offsetof(struct mdt_body, uid) == 120, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, uid));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->uid) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->uid));
-       LASSERTF((int)offsetof(struct mdt_body, gid) == 124, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, gid));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->gid) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->gid));
-       LASSERTF((int)offsetof(struct mdt_body, flags) == 128, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, flags));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->flags) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->flags));
-       LASSERTF((int)offsetof(struct mdt_body, rdev) == 132, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, rdev));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->rdev) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->rdev));
-       LASSERTF((int)offsetof(struct mdt_body, nlink) == 136, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, nlink));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->nlink) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->nlink));
-       LASSERTF((int)offsetof(struct mdt_body, unused2) == 140, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, unused2));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->unused2) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->unused2));
-       LASSERTF((int)offsetof(struct mdt_body, suppgid) == 144, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, suppgid));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->suppgid) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->suppgid));
-       LASSERTF((int)offsetof(struct mdt_body, eadatasize) == 148, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, eadatasize));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->eadatasize) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->eadatasize));
-       LASSERTF((int)offsetof(struct mdt_body, aclsize) == 152, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, aclsize));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->aclsize) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->aclsize));
-       LASSERTF((int)offsetof(struct mdt_body, max_mdsize) == 156, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, max_mdsize));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->max_mdsize) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->max_mdsize));
-       LASSERTF((int)offsetof(struct mdt_body, max_cookiesize) == 160, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, max_cookiesize));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->max_cookiesize) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->max_cookiesize));
-       LASSERTF((int)offsetof(struct mdt_body, uid_h) == 164, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, uid_h));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->uid_h) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->uid_h));
-       LASSERTF((int)offsetof(struct mdt_body, gid_h) == 168, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, gid_h));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->gid_h) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->gid_h));
-       LASSERTF((int)offsetof(struct mdt_body, padding_5) == 172, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, padding_5));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->padding_5) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->padding_5));
-       LASSERTF((int)offsetof(struct mdt_body, padding_6) == 176, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, padding_6));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->padding_6) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->padding_6));
-       LASSERTF((int)offsetof(struct mdt_body, padding_7) == 184, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, padding_7));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->padding_7) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->padding_7));
-       LASSERTF((int)offsetof(struct mdt_body, padding_8) == 192, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, padding_8));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->padding_8) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->padding_8));
-       LASSERTF((int)offsetof(struct mdt_body, padding_9) == 200, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, padding_9));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->padding_9) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->padding_9));
-       LASSERTF((int)offsetof(struct mdt_body, padding_10) == 208, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, padding_10));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->padding_10) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->padding_10));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_fid1) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_fid1));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_fid1) == 16, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_fid1));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_fid2) == 16, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_fid2));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_fid2) == 16, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_fid2));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_handle) == 32, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_handle));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_handle) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_handle));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_valid) == 40, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_valid));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_valid) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_valid));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_size) == 48, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_size));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_size) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_size));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_mtime) == 56, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_mtime));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_mtime) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_mtime));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_atime) == 64, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_atime));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_atime) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_atime));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_ctime) == 72, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_ctime));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_ctime) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_ctime));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_blocks) == 80, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_blocks));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_blocks) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_blocks));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_t_state) == 96, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_t_state));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_t_state) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_t_state));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_fsuid) == 104, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_fsuid));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_fsuid) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_fsuid));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_fsgid) == 108, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_fsgid));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_fsgid) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_fsgid));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_capability) == 112, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_capability));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_capability) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_capability));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_mode) == 116, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_mode));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_mode) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_mode));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_uid) == 120, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_uid));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_uid) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_uid));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_gid) == 124, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_gid));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_gid) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_gid));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_flags) == 128, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_flags));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_flags) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_flags));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_rdev) == 132, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_rdev));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_rdev) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_rdev));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_nlink) == 136, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_nlink));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_nlink) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_nlink));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_unused2) == 140, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_unused2));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_unused2) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_unused2));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_suppgid) == 144, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_suppgid));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_suppgid) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_suppgid));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_eadatasize) == 148, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_eadatasize));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_eadatasize) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_eadatasize));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_aclsize) == 152, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_aclsize));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_aclsize) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_aclsize));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_max_mdsize) == 156, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_max_mdsize));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_max_mdsize) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_max_mdsize));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_max_cookiesize) == 160, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_max_cookiesize));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_max_cookiesize) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_max_cookiesize));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_uid_h) == 164, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_uid_h));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_uid_h) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_uid_h));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_gid_h) == 168, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_gid_h));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_gid_h) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_gid_h));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_padding_5) == 172, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_padding_5));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_padding_5) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_padding_5));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_padding_6) == 176, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_padding_6));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_padding_6) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_padding_6));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_padding_7) == 184, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_padding_7));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_padding_7) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_padding_7));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_padding_8) == 192, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_padding_8));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_padding_8) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_padding_8));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_padding_9) == 200, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_padding_9));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_padding_9) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_padding_9));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_padding_10) == 208, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_padding_10));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_padding_10) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_padding_10));
        LASSERTF(MDS_FMODE_CLOSED == 000000000000UL, "found 0%.11oUL\n",
                MDS_FMODE_CLOSED);
        LASSERTF(MDS_FMODE_EXEC == 000000000004UL, "found 0%.11oUL\n",
        LASSERTF(MDS_FMODE_CLOSED == 000000000000UL, "found 0%.11oUL\n",
                MDS_FMODE_CLOSED);
        LASSERTF(MDS_FMODE_EXEC == 000000000004UL, "found 0%.11oUL\n",
index 4ab8dc2..d986c40 100644 (file)
@@ -76,29 +76,29 @@ static int tgt_mdt_body_unpack(struct tgt_session_info *tsi, __u32 flags)
 
        tsi->tsi_mdt_body = body;
 
 
        tsi->tsi_mdt_body = body;
 
-       if (!(body->valid & OBD_MD_FLID))
+       if (!(body->mbo_valid & OBD_MD_FLID))
                RETURN(0);
 
        /* mdc_pack_body() doesn't check if fid is zero and set OBD_ML_FID
         * in any case in pre-2.5 clients. Fix that here if needed */
                RETURN(0);
 
        /* mdc_pack_body() doesn't check if fid is zero and set OBD_ML_FID
         * in any case in pre-2.5 clients. Fix that here if needed */
-       if (unlikely(fid_is_zero(&body->fid1)))
+       if (unlikely(fid_is_zero(&body->mbo_fid1)))
                RETURN(0);
 
                RETURN(0);
 
-       if (!fid_is_sane(&body->fid1)) {
+       if (!fid_is_sane(&body->mbo_fid1)) {
                CERROR("%s: invalid FID: "DFID"\n", tgt_name(tsi->tsi_tgt),
                CERROR("%s: invalid FID: "DFID"\n", tgt_name(tsi->tsi_tgt),
-                      PFID(&body->fid1));
+                      PFID(&body->mbo_fid1));
                RETURN(-EINVAL);
        }
 
        obj = lu_object_find(tsi->tsi_env,
                             &tsi->tsi_tgt->lut_bottom->dd_lu_dev,
                RETURN(-EINVAL);
        }
 
        obj = lu_object_find(tsi->tsi_env,
                             &tsi->tsi_tgt->lut_bottom->dd_lu_dev,
-                            &body->fid1, NULL);
+                            &body->mbo_fid1, NULL);
        if (!IS_ERR(obj)) {
                if ((flags & HABEO_CORPUS) && !lu_object_exists(obj)) {
                        lu_object_put(tsi->tsi_env, obj);
                        /* for capability renew ENOENT will be handled in
                         * mdt_renew_capa */
        if (!IS_ERR(obj)) {
                if ((flags & HABEO_CORPUS) && !lu_object_exists(obj)) {
                        lu_object_put(tsi->tsi_env, obj);
                        /* for capability renew ENOENT will be handled in
                         * mdt_renew_capa */
-                       if (body->valid & OBD_MD_FLOSSCAPA)
+                       if (body->mbo_valid & OBD_MD_FLOSSCAPA)
                                rc = 0;
                        else
                                rc = -ENOENT;
                                rc = 0;
                        else
                                rc = -ENOENT;
@@ -110,7 +110,7 @@ static int tgt_mdt_body_unpack(struct tgt_session_info *tsi, __u32 flags)
                rc = PTR_ERR(obj);
        }
 
                rc = PTR_ERR(obj);
        }
 
-       tsi->tsi_fid = body->fid1;
+       tsi->tsi_fid = body->mbo_fid1;
 
        RETURN(rc);
 }
 
        RETURN(rc);
 }
@@ -398,7 +398,7 @@ static int tgt_handle_request0(struct tgt_session_info *tsi,
                                          RCL_SERVER))
                        req_capsule_set_size(tsi->tsi_pill, &RMF_MDT_MD,
                                             RCL_SERVER,
                                          RCL_SERVER))
                        req_capsule_set_size(tsi->tsi_pill, &RMF_MDT_MD,
                                             RCL_SERVER,
-                                            tsi->tsi_mdt_body->eadatasize);
+                                            tsi->tsi_mdt_body->mbo_eadatasize);
                if (req_capsule_has_field(tsi->tsi_pill, &RMF_LOGCOOKIES,
                                          RCL_SERVER))
                        req_capsule_set_size(tsi->tsi_pill, &RMF_LOGCOOKIES,
                if (req_capsule_has_field(tsi->tsi_pill, &RMF_LOGCOOKIES,
                                          RCL_SERVER))
                        req_capsule_set_size(tsi->tsi_pill, &RMF_LOGCOOKIES,
index 685b4ee..bf3adb7 100644 (file)
@@ -871,39 +871,39 @@ check_mdt_body(void)
 {
        BLANK_LINE();
        CHECK_STRUCT(mdt_body);
 {
        BLANK_LINE();
        CHECK_STRUCT(mdt_body);
-       CHECK_MEMBER(mdt_body, fid1);
-       CHECK_MEMBER(mdt_body, fid2);
-       CHECK_MEMBER(mdt_body, handle);
-       CHECK_MEMBER(mdt_body, valid);
-       CHECK_MEMBER(mdt_body, size);
-       CHECK_MEMBER(mdt_body, mtime);
-       CHECK_MEMBER(mdt_body, atime);
-       CHECK_MEMBER(mdt_body, ctime);
-       CHECK_MEMBER(mdt_body, blocks);
-       CHECK_MEMBER(mdt_body, t_state);
-       CHECK_MEMBER(mdt_body, fsuid);
-       CHECK_MEMBER(mdt_body, fsgid);
-       CHECK_MEMBER(mdt_body, capability);
-       CHECK_MEMBER(mdt_body, mode);
-       CHECK_MEMBER(mdt_body, uid);
-       CHECK_MEMBER(mdt_body, gid);
-       CHECK_MEMBER(mdt_body, flags);
-       CHECK_MEMBER(mdt_body, rdev);
-       CHECK_MEMBER(mdt_body, nlink);
-       CHECK_MEMBER(mdt_body, unused2);
-       CHECK_MEMBER(mdt_body, suppgid);
-       CHECK_MEMBER(mdt_body, eadatasize);
-       CHECK_MEMBER(mdt_body, aclsize);
-       CHECK_MEMBER(mdt_body, max_mdsize);
-       CHECK_MEMBER(mdt_body, max_cookiesize);
-       CHECK_MEMBER(mdt_body, uid_h);
-       CHECK_MEMBER(mdt_body, gid_h);
-       CHECK_MEMBER(mdt_body, padding_5);
-       CHECK_MEMBER(mdt_body, padding_6);
-       CHECK_MEMBER(mdt_body, padding_7);
-       CHECK_MEMBER(mdt_body, padding_8);
-       CHECK_MEMBER(mdt_body, padding_9);
-       CHECK_MEMBER(mdt_body, padding_10);
+       CHECK_MEMBER(mdt_body, mbo_fid1);
+       CHECK_MEMBER(mdt_body, mbo_fid2);
+       CHECK_MEMBER(mdt_body, mbo_handle);
+       CHECK_MEMBER(mdt_body, mbo_valid);
+       CHECK_MEMBER(mdt_body, mbo_size);
+       CHECK_MEMBER(mdt_body, mbo_mtime);
+       CHECK_MEMBER(mdt_body, mbo_atime);
+       CHECK_MEMBER(mdt_body, mbo_ctime);
+       CHECK_MEMBER(mdt_body, mbo_blocks);
+       CHECK_MEMBER(mdt_body, mbo_t_state);
+       CHECK_MEMBER(mdt_body, mbo_fsuid);
+       CHECK_MEMBER(mdt_body, mbo_fsgid);
+       CHECK_MEMBER(mdt_body, mbo_capability);
+       CHECK_MEMBER(mdt_body, mbo_mode);
+       CHECK_MEMBER(mdt_body, mbo_uid);
+       CHECK_MEMBER(mdt_body, mbo_gid);
+       CHECK_MEMBER(mdt_body, mbo_flags);
+       CHECK_MEMBER(mdt_body, mbo_rdev);
+       CHECK_MEMBER(mdt_body, mbo_nlink);
+       CHECK_MEMBER(mdt_body, mbo_unused2);
+       CHECK_MEMBER(mdt_body, mbo_suppgid);
+       CHECK_MEMBER(mdt_body, mbo_eadatasize);
+       CHECK_MEMBER(mdt_body, mbo_aclsize);
+       CHECK_MEMBER(mdt_body, mbo_max_mdsize);
+       CHECK_MEMBER(mdt_body, mbo_max_cookiesize);
+       CHECK_MEMBER(mdt_body, mbo_uid_h);
+       CHECK_MEMBER(mdt_body, mbo_gid_h);
+       CHECK_MEMBER(mdt_body, mbo_padding_5);
+       CHECK_MEMBER(mdt_body, mbo_padding_6);
+       CHECK_MEMBER(mdt_body, mbo_padding_7);
+       CHECK_MEMBER(mdt_body, mbo_padding_8);
+       CHECK_MEMBER(mdt_body, mbo_padding_9);
+       CHECK_MEMBER(mdt_body, mbo_padding_10);
 
        CHECK_VALUE_O(MDS_FMODE_CLOSED);
        CHECK_VALUE_O(MDS_FMODE_EXEC);
 
        CHECK_VALUE_O(MDS_FMODE_CLOSED);
        CHECK_VALUE_O(MDS_FMODE_EXEC);
index c9fd44e..715e952 100644 (file)
@@ -61,8 +61,8 @@ void lustre_assert_wire_constants(void)
 {
         /* Wire protocol assertions generated by 'wirecheck'
          * (make -C lustre/utils newwiretest)
 {
         /* Wire protocol assertions generated by 'wirecheck'
          * (make -C lustre/utils newwiretest)
-         * running on Linux u 2.6.32-431.5.1.el6.lustre.x86_64 #1 SMP Wed Feb 12 11:01:08 CST 2014 x8
-         * with gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)  */
+         * running on Linux t 2.6.32-358.18.1.el6.lustre.x86_64 #1 SMP Mon Sep 2 15:21:03 CDT 2013 x8
+         * with gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)  */
 
 
        /* Constants... */
 
 
        /* Constants... */
@@ -1472,7 +1472,7 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_objects[0]));
        LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects[0]) == 24, "found %lld\n",
                 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects[0]));
                 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_objects[0]));
        LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects[0]) == 24, "found %lld\n",
                 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects[0]));
-       CLASSERT(LOV_MAGIC_V1 == 0x0BD10BD0);
+       CLASSERT(LOV_MAGIC_V1 == (0x0BD10000 | 0x0BD0));
 
        /* Checks for struct lov_mds_md_v3 */
        LASSERTF((int)sizeof(struct lov_mds_md_v3) == 48, "found %lld\n",
 
        /* Checks for struct lov_mds_md_v3 */
        LASSERTF((int)sizeof(struct lov_mds_md_v3) == 48, "found %lld\n",
@@ -1510,7 +1510,7 @@ void lustre_assert_wire_constants(void)
                 (long long)(int)offsetof(struct lov_mds_md_v3, lmm_objects[0]));
        LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_objects[0]) == 24, "found %lld\n",
                 (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_objects[0]));
                 (long long)(int)offsetof(struct lov_mds_md_v3, lmm_objects[0]));
        LASSERTF((int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_objects[0]) == 24, "found %lld\n",
                 (long long)(int)sizeof(((struct lov_mds_md_v3 *)0)->lmm_objects[0]));
-       CLASSERT(LOV_MAGIC_V3 == 0x0BD30BD0);
+       CLASSERT(LOV_MAGIC_V3 == (0x0BD30000 | 0x0BD0));
        LASSERTF(LOV_PATTERN_RAID0 == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)LOV_PATTERN_RAID0);
        LASSERTF(LOV_PATTERN_RAID1 == 0x00000002UL, "found 0x%.8xUL\n",
        LASSERTF(LOV_PATTERN_RAID0 == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)LOV_PATTERN_RAID0);
        LASSERTF(LOV_PATTERN_RAID1 == 0x00000002UL, "found 0x%.8xUL\n",
@@ -1926,138 +1926,138 @@ void lustre_assert_wire_constants(void)
        /* Checks for struct mdt_body */
        LASSERTF((int)sizeof(struct mdt_body) == 216, "found %lld\n",
                 (long long)(int)sizeof(struct mdt_body));
        /* Checks for struct mdt_body */
        LASSERTF((int)sizeof(struct mdt_body) == 216, "found %lld\n",
                 (long long)(int)sizeof(struct mdt_body));
-       LASSERTF((int)offsetof(struct mdt_body, fid1) == 0, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, fid1));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->fid1) == 16, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->fid1));
-       LASSERTF((int)offsetof(struct mdt_body, fid2) == 16, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, fid2));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->fid2) == 16, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->fid2));
-       LASSERTF((int)offsetof(struct mdt_body, handle) == 32, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, handle));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->handle) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->handle));
-       LASSERTF((int)offsetof(struct mdt_body, valid) == 40, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, valid));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->valid) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->valid));
-       LASSERTF((int)offsetof(struct mdt_body, size) == 48, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, size));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->size) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->size));
-       LASSERTF((int)offsetof(struct mdt_body, mtime) == 56, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, mtime));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->mtime) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->mtime));
-       LASSERTF((int)offsetof(struct mdt_body, atime) == 64, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, atime));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->atime) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->atime));
-       LASSERTF((int)offsetof(struct mdt_body, ctime) == 72, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, ctime));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->ctime) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->ctime));
-       LASSERTF((int)offsetof(struct mdt_body, blocks) == 80, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, blocks));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->blocks) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->blocks));
-       LASSERTF((int)offsetof(struct mdt_body, t_state) == 96, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, t_state));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->t_state) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->t_state));
-       LASSERTF((int)offsetof(struct mdt_body, fsuid) == 104, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, fsuid));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->fsuid) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->fsuid));
-       LASSERTF((int)offsetof(struct mdt_body, fsgid) == 108, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, fsgid));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->fsgid) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->fsgid));
-       LASSERTF((int)offsetof(struct mdt_body, capability) == 112, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, capability));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->capability) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->capability));
-       LASSERTF((int)offsetof(struct mdt_body, mode) == 116, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, mode));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->mode) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->mode));
-       LASSERTF((int)offsetof(struct mdt_body, uid) == 120, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, uid));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->uid) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->uid));
-       LASSERTF((int)offsetof(struct mdt_body, gid) == 124, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, gid));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->gid) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->gid));
-       LASSERTF((int)offsetof(struct mdt_body, flags) == 128, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, flags));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->flags) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->flags));
-       LASSERTF((int)offsetof(struct mdt_body, rdev) == 132, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, rdev));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->rdev) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->rdev));
-       LASSERTF((int)offsetof(struct mdt_body, nlink) == 136, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, nlink));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->nlink) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->nlink));
-       LASSERTF((int)offsetof(struct mdt_body, unused2) == 140, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, unused2));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->unused2) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->unused2));
-       LASSERTF((int)offsetof(struct mdt_body, suppgid) == 144, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, suppgid));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->suppgid) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->suppgid));
-       LASSERTF((int)offsetof(struct mdt_body, eadatasize) == 148, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, eadatasize));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->eadatasize) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->eadatasize));
-       LASSERTF((int)offsetof(struct mdt_body, aclsize) == 152, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, aclsize));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->aclsize) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->aclsize));
-       LASSERTF((int)offsetof(struct mdt_body, max_mdsize) == 156, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, max_mdsize));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->max_mdsize) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->max_mdsize));
-       LASSERTF((int)offsetof(struct mdt_body, max_cookiesize) == 160, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, max_cookiesize));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->max_cookiesize) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->max_cookiesize));
-       LASSERTF((int)offsetof(struct mdt_body, uid_h) == 164, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, uid_h));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->uid_h) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->uid_h));
-       LASSERTF((int)offsetof(struct mdt_body, gid_h) == 168, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, gid_h));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->gid_h) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->gid_h));
-       LASSERTF((int)offsetof(struct mdt_body, padding_5) == 172, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, padding_5));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->padding_5) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->padding_5));
-       LASSERTF((int)offsetof(struct mdt_body, padding_6) == 176, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, padding_6));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->padding_6) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->padding_6));
-       LASSERTF((int)offsetof(struct mdt_body, padding_7) == 184, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, padding_7));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->padding_7) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->padding_7));
-       LASSERTF((int)offsetof(struct mdt_body, padding_8) == 192, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, padding_8));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->padding_8) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->padding_8));
-       LASSERTF((int)offsetof(struct mdt_body, padding_9) == 200, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, padding_9));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->padding_9) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->padding_9));
-       LASSERTF((int)offsetof(struct mdt_body, padding_10) == 208, "found %lld\n",
-                (long long)(int)offsetof(struct mdt_body, padding_10));
-       LASSERTF((int)sizeof(((struct mdt_body *)0)->padding_10) == 8, "found %lld\n",
-                (long long)(int)sizeof(((struct mdt_body *)0)->padding_10));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_fid1) == 0, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_fid1));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_fid1) == 16, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_fid1));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_fid2) == 16, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_fid2));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_fid2) == 16, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_fid2));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_handle) == 32, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_handle));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_handle) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_handle));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_valid) == 40, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_valid));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_valid) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_valid));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_size) == 48, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_size));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_size) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_size));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_mtime) == 56, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_mtime));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_mtime) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_mtime));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_atime) == 64, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_atime));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_atime) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_atime));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_ctime) == 72, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_ctime));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_ctime) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_ctime));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_blocks) == 80, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_blocks));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_blocks) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_blocks));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_t_state) == 96, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_t_state));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_t_state) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_t_state));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_fsuid) == 104, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_fsuid));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_fsuid) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_fsuid));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_fsgid) == 108, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_fsgid));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_fsgid) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_fsgid));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_capability) == 112, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_capability));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_capability) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_capability));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_mode) == 116, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_mode));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_mode) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_mode));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_uid) == 120, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_uid));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_uid) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_uid));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_gid) == 124, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_gid));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_gid) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_gid));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_flags) == 128, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_flags));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_flags) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_flags));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_rdev) == 132, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_rdev));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_rdev) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_rdev));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_nlink) == 136, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_nlink));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_nlink) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_nlink));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_unused2) == 140, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_unused2));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_unused2) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_unused2));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_suppgid) == 144, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_suppgid));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_suppgid) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_suppgid));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_eadatasize) == 148, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_eadatasize));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_eadatasize) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_eadatasize));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_aclsize) == 152, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_aclsize));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_aclsize) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_aclsize));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_max_mdsize) == 156, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_max_mdsize));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_max_mdsize) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_max_mdsize));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_max_cookiesize) == 160, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_max_cookiesize));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_max_cookiesize) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_max_cookiesize));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_uid_h) == 164, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_uid_h));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_uid_h) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_uid_h));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_gid_h) == 168, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_gid_h));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_gid_h) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_gid_h));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_padding_5) == 172, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_padding_5));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_padding_5) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_padding_5));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_padding_6) == 176, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_padding_6));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_padding_6) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_padding_6));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_padding_7) == 184, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_padding_7));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_padding_7) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_padding_7));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_padding_8) == 192, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_padding_8));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_padding_8) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_padding_8));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_padding_9) == 200, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_padding_9));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_padding_9) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_padding_9));
+       LASSERTF((int)offsetof(struct mdt_body, mbo_padding_10) == 208, "found %lld\n",
+                (long long)(int)offsetof(struct mdt_body, mbo_padding_10));
+       LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_padding_10) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct mdt_body *)0)->mbo_padding_10));
        LASSERTF(MDS_FMODE_CLOSED == 000000000000UL, "found 0%.11oUL\n",
                MDS_FMODE_CLOSED);
        LASSERTF(MDS_FMODE_EXEC == 000000000004UL, "found 0%.11oUL\n",
        LASSERTF(MDS_FMODE_CLOSED == 000000000000UL, "found 0%.11oUL\n",
                MDS_FMODE_CLOSED);
        LASSERTF(MDS_FMODE_EXEC == 000000000004UL, "found 0%.11oUL\n",