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

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

staging: lustre: obd: remove client Size on MDS support



Remove the unused OBD MD API method md_done_writing(). Remove the
unused logcookie and struct md_open_data ** parameters from
md_setattr(). Remove the unused functions iattr_from_obdo(),
md_from_obdo(), and obdo_refresh_inode().

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


Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarJinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: default avatarHenri Doreau <henri.doreau@cea.fr>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0cd99931
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -2049,8 +2049,6 @@ enum md_op_flags {
	MF_GET_MDT_IDX	  = (1 << 9),
};

#define MF_SOM_LOCAL_FLAGS (MF_SOM_CHANGE | MF_EPOCH_OPEN | MF_EPOCH_CLOSE)

#define LUSTRE_BFLAG_UNCOMMITTED_WRITES   0x1

/* these should be identical to their EXT4_*_FL counterparts, they are
+1 −6
Original line number Diff line number Diff line
@@ -789,8 +789,6 @@ struct md_op_data {
	__u64		   op_valid;
	loff_t		  op_attr_blocks;

	/* Size-on-MDS epoch and flags. */
	__u64		   op_ioepoch;
	__u32		   op_flags;

	/* Various operation flags. */
@@ -992,8 +990,6 @@ struct md_ops {
	int (*create)(struct obd_export *, struct md_op_data *,
		      const void *, size_t, umode_t, uid_t, gid_t,
		      cfs_cap_t, __u64, struct ptlrpc_request **);
	int (*done_writing)(struct obd_export *, struct md_op_data  *,
			    struct md_open_data *);
	int (*enqueue)(struct obd_export *, struct ldlm_enqueue_info *,
		       const ldlm_policy_data_t *,
		       struct lookup_intent *, struct md_op_data *,
@@ -1012,8 +1008,7 @@ struct md_ops {
		      const char *, size_t, const char *, size_t,
		      struct ptlrpc_request **);
	int (*setattr)(struct obd_export *, struct md_op_data *, void *,
		       size_t, void *, size_t, struct ptlrpc_request **,
			 struct md_open_data **mod);
		       size_t, struct ptlrpc_request **);
	int (*sync)(struct obd_export *, const struct lu_fid *,
		    struct ptlrpc_request **);
	int (*read_page)(struct obd_export *, struct md_op_data *,
+3 −19
Original line number Diff line number Diff line
@@ -269,10 +269,8 @@ static inline int lprocfs_climp_check(struct obd_device *obd)
struct inode;
struct lu_attr;
struct obdo;
void obdo_refresh_inode(struct inode *dst, const struct obdo *src, u32 valid);

void obdo_to_ioobj(const struct obdo *oa, struct obd_ioobj *ioobj);
void md_from_obdo(struct md_op_data *op_data, const struct obdo *oa, u32 valid);

#define OBT(dev)	(dev)->obd_type
#define OBP(dev, op)    (dev)->obd_type->typ_dt_ops->op
@@ -1346,18 +1344,6 @@ static inline int md_create(struct obd_export *exp, struct md_op_data *op_data,
	return rc;
}

static inline int md_done_writing(struct obd_export *exp,
				  struct md_op_data *op_data,
				  struct md_open_data *mod)
{
	int rc;

	EXP_CHECK_MD_OP(exp, done_writing);
	EXP_MD_COUNTER_INCREMENT(exp, done_writing);
	rc = MDP(exp->exp_obd, done_writing)(exp, op_data, mod);
	return rc;
}

static inline int md_enqueue(struct obd_export *exp,
			     struct ldlm_enqueue_info *einfo,
			     const ldlm_policy_data_t *policy,
@@ -1428,16 +1414,14 @@ static inline int md_rename(struct obd_export *exp, struct md_op_data *op_data,
}

static inline int md_setattr(struct obd_export *exp, struct md_op_data *op_data,
			     void *ea, size_t ealen, void *ea2, size_t ea2len,
			     struct ptlrpc_request **request,
			     struct md_open_data **mod)
			     void *ea, size_t ealen,
			     struct ptlrpc_request **request)
{
	int rc;

	EXP_CHECK_MD_OP(exp, setattr);
	EXP_MD_COUNTER_INCREMENT(exp, setattr);
	rc = MDP(exp->exp_obd, setattr)(exp, op_data, ea, ealen,
					ea2, ea2len, request, mod);
	rc = MDP(exp->exp_obd, setattr)(exp, op_data, ea, ealen, request);
	return rc;
}

+1 −2
Original line number Diff line number Diff line
@@ -501,8 +501,7 @@ int ll_dir_setstripe(struct inode *inode, struct lov_user_md *lump,
		return PTR_ERR(op_data);

	/* swabbing is done in lov_setstripe() on server side */
	rc = md_setattr(sbi->ll_md_exp, op_data, lump, lum_size,
			NULL, 0, &req, NULL);
	rc = md_setattr(sbi->ll_md_exp, op_data, lump, lum_size, &req);
	ll_finish_md_op_data(op_data);
	ptlrpc_req_finished(req);
	if (rc) {
+4 −8
Original line number Diff line number Diff line
@@ -1295,8 +1295,7 @@ void ll_clear_inode(struct inode *inode)

#define TIMES_SET_FLAGS (ATTR_MTIME_SET | ATTR_ATIME_SET | ATTR_TIMES_SET)

static int ll_md_setattr(struct dentry *dentry, struct md_op_data *op_data,
			 struct md_open_data **mod)
static int ll_md_setattr(struct dentry *dentry, struct md_op_data *op_data)
{
	struct lustre_md md;
	struct inode *inode = d_inode(dentry);
@@ -1309,8 +1308,7 @@ static int ll_md_setattr(struct dentry *dentry, struct md_op_data *op_data,
	if (IS_ERR(op_data))
		return PTR_ERR(op_data);

	rc = md_setattr(sbi->ll_md_exp, op_data, NULL, 0, NULL, 0,
			&request, mod);
	rc = md_setattr(sbi->ll_md_exp, op_data, NULL, 0, &request);
	if (rc) {
		ptlrpc_req_finished(request);
		if (rc == -ENOENT) {
@@ -1372,7 +1370,6 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)
	struct inode *inode = d_inode(dentry);
	struct ll_inode_info *lli = ll_i2info(inode);
	struct md_op_data *op_data = NULL;
	struct md_open_data *mod = NULL;
	bool file_is_released = false;
	int rc = 0;

@@ -1477,7 +1474,7 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)

	memcpy(&op_data->op_attr, attr, sizeof(*attr));

	rc = ll_md_setattr(dentry, op_data, &mod);
	rc = ll_md_setattr(dentry, op_data);
	if (rc)
		goto out;

@@ -1896,8 +1893,7 @@ int ll_iocontrol(struct inode *inode, struct file *file,

		op_data->op_attr_flags = flags;
		op_data->op_attr.ia_valid |= ATTR_ATTR_FLAG;
		rc = md_setattr(sbi->ll_md_exp, op_data,
				NULL, 0, NULL, 0, &req, NULL);
		rc = md_setattr(sbi->ll_md_exp, op_data, NULL, 0, &req);
		ll_finish_md_op_data(op_data);
		ptlrpc_req_finished(req);
		if (rc)
Loading