Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e1b5b8b authored by John L. Hammond's avatar John L. Hammond Committed by Greg Kroah-Hartman
Browse files

staging: lustre: mdt: add mbo_ prefix to members of struct mdt_body



Rename each member of struct mdt_body, adding the prefix mbo_.

Signed-off-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
Reviewed-on: http://review.whamcloud.com/10202


Reviewed-by: default avatarBob Glossman <bob.glossman@intel.com>
Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarMike Pershin <mike.pershin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 50ccd16e
Loading
Loading
Loading
Loading
+37 −37
Original line number Diff line number Diff line
@@ -2097,43 +2097,43 @@ enum md_transient_state {
};

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 */
	__s64	  mtime;
	__s64	  atime;
	__s64	  ctime;
	__u64	  blocks; /* XID, in the case of MDS_READPAGE */
	__u64	  ioepoch;
	__u64	  t_state; /* transient file state defined in
	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 */
	__s64	mbo_mtime;
	__s64	mbo_atime;
	__s64	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	  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;
	__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 */

void lustre_swab_mdt_body(struct mdt_body *b);
+7 −7
Original line number Diff line number Diff line
@@ -163,18 +163,18 @@ 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)
{
	if (body->valid & OBD_MD_FLMODEASIZE) {
	if (body->mbo_valid & OBD_MD_FLMODEASIZE) {
		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 =
			    min_t(__u32, body->max_mdsize, PAGE_SIZE);
			    min_t(__u32, body->mbo_max_mdsize, PAGE_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 =
			    min_t(__u32, body->max_cookiesize, PAGE_SIZE);
			    min_t(__u32, body->mbo_max_cookiesize, PAGE_SIZE);
		}
	}
}
+15 −15
Original line number Diff line number Diff line
@@ -188,8 +188,8 @@ static int ll_dir_filler(void *_hash, struct page *page0)
	} else if (rc == 0) {
		body = req_capsule_server_get(&request->rq_pill, &RMF_MDT_BODY);
		/* Checked by mdc_readpage() */
		if (body->valid & OBD_MD_FLSIZE)
			i_size_write(inode, body->size);
		if (body->mbo_valid & OBD_MD_FLSIZE)
			i_size_write(inode, body->mbo_size);

		nrdpgs = (request->rq_bulk->bd_nob_transferred+PAGE_SIZE-1)
			 >> PAGE_SHIFT;
@@ -894,9 +894,9 @@ int ll_dir_getstripe(struct inode *inode, void **plmm, int *plmm_size,

	body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);

	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) {
		rc = -ENODATA;
		goto out;
@@ -1639,18 +1639,18 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
			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_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_SIZE;
			st.st_blocks  = body->blocks;
			st.st_atime   = body->atime;
			st.st_mtime   = body->mtime;
			st.st_ctime   = body->ctime;
			st.st_ino     = cl_fid_build_ino(&body->fid1,
			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     = cl_fid_build_ino(&body->mbo_fid1,
							 sbi->ll_flags &
							 LL_SBI_32BIT_API);

+10 −10
Original line number Diff line number Diff line
@@ -200,7 +200,7 @@ static int ll_close_inode_openhandle(struct obd_export *md_exp,
		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;
	}

@@ -482,8 +482,8 @@ static int ll_och_fill(struct obd_export *md_exp, struct lookup_intent *it,
	struct mdt_body *body;

	body = req_capsule_server_get(&it->it_request->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->it_lock_handle;
	och->och_magic = OBD_CLIENT_HANDLE_MAGIC;
	och->och_flags = it->it_flags;
@@ -511,7 +511,7 @@ static int ll_local_open(struct file *file, struct lookup_intent *it,

		body = req_capsule_server_get(&it->it_request->rq_pill,
					      &RMF_MDT_BODY);
		ll_ioepoch_open(lli, body->ioepoch);
		ll_ioepoch_open(lli, body->mbo_ioepoch);
	}

	LUSTRE_FPRIVATE(file) = fd;
@@ -1451,9 +1451,9 @@ int ll_lov_getstripe_ea_info(struct inode *inode, const char *filename,

	body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);

	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) {
		rc = -ENODATA;
		goto out;
@@ -1484,13 +1484,13 @@ int ll_lov_getstripe_ea_info(struct inode *inode, const char *filename,
		 */
		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))
			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->mode))
			if (S_ISREG(body->mbo_mode))
				lustre_swab_lov_user_md_objects(
				 ((struct lov_user_md_v3 *)lmm)->lmm_objects,
				 stripe_count);
@@ -2861,7 +2861,7 @@ int ll_get_fid_by_name(struct inode *parent, const char *name,
		goto out_req;
	}
	if (fid)
		*fid = body->fid1;
		*fid = body->mbo_fid1;
out_req:
	ptlrpc_req_finished(req);
	return rc;
@@ -3583,7 +3583,7 @@ static int ll_layout_fetch(struct inode *inode, struct ldlm_lock *lock)
		goto out;
	}

	lmmsize = body->eadatasize;
	lmmsize = body->mbo_eadatasize;
	if (lmmsize == 0) /* empty layout */ {
		rc = 0;
		goto out;
+1 −1
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@ int cl_file_inode_init(struct inode *inode, struct lustre_md *md)
	int result = 0;
	int refcheck;

	LASSERT(md->body->valid & OBD_MD_FLID);
	LASSERT(md->body->mbo_valid & OBD_MD_FLID);
	LASSERT(S_ISREG(inode->i_mode));

	env = cl_env_get(&refcheck);
Loading