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

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

staging: lustre: osc: remove remaining bits for capa support



With capa support removed from the OSC layer a few more bits
can be cleaned up. Convert the OBD getattr and setattr paths
to use struct obdo rather than struct obd_info. Remove
the oi_policy, oi_oa, and oi_capa members from struct obd_info.

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


Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarAlex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: default avatarJames Simmons <uja.ornl@yahoo.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e1f361ac
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -126,17 +126,10 @@ typedef int (*obd_enqueue_update_f)(void *cookie, int rc);

/* obd info for a particular level (lov, osc). */
struct obd_info {
	/* Flags used for set request specific flags:
	   - while lock handling, the flags obtained on the enqueue
	   request are set here.
	   - while stats, the flags used for control delay/resend.
	   - while setattr, the flags used for distinguish punch operation
	 */
	/* OBD_STATFS_* flags */
	__u64		   oi_flags;
	/* lsm data specific for every OSC. */
	struct lov_stripe_md   *oi_md;
	/* obdo data specific for every OSC, if needed at all. */
	struct obdo	    *oi_oa;
	/* statfs data specific for every OSC, if needed at all. */
	struct obd_statfs      *oi_osfs;
	/* An update callback which is called to update some data on upper
@@ -871,9 +864,9 @@ struct obd_ops {
	int (*destroy)(const struct lu_env *env, struct obd_export *exp,
		       struct obdo *oa);
	int (*setattr)(const struct lu_env *, struct obd_export *exp,
		       struct obd_info *oinfo);
		       struct obdo *oa);
	int (*getattr)(const struct lu_env *env, struct obd_export *exp,
		       struct obd_info *oinfo);
		       struct obdo *oa);
	int (*preprw)(const struct lu_env *env, int cmd,
		      struct obd_export *exp, struct obdo *oa, int objcount,
		      struct obd_ioobj *obj, struct niobuf_remote *remote,
+9 −8
Original line number Diff line number Diff line
@@ -705,26 +705,26 @@ static inline int obd_destroy(const struct lu_env *env, struct obd_export *exp,
}

static inline int obd_getattr(const struct lu_env *env, struct obd_export *exp,
			      struct obd_info *oinfo)
			      struct obdo *oa)
{
	int rc;

	EXP_CHECK_DT_OP(exp, getattr);
	EXP_COUNTER_INCREMENT(exp, getattr);

	rc = OBP(exp->exp_obd, getattr)(env, exp, oinfo);
	rc = OBP(exp->exp_obd, getattr)(env, exp, oa);
	return rc;
}

static inline int obd_setattr(const struct lu_env *env, struct obd_export *exp,
			      struct obd_info *oinfo)
			      struct obdo *oa)
{
	int rc;

	EXP_CHECK_DT_OP(exp, setattr);
	EXP_COUNTER_INCREMENT(exp, setattr);

	rc = OBP(exp->exp_obd, setattr)(env, exp, oinfo);
	rc = OBP(exp->exp_obd, setattr)(env, exp, oa);
	return rc;
}

@@ -991,15 +991,16 @@ static inline int obd_statfs_rqset(struct obd_export *exp,
				   __u32 flags)
{
	struct ptlrpc_request_set *set = NULL;
	struct obd_info oinfo = { };
	struct obd_info oinfo = {
		.oi_osfs = osfs,
		.oi_flags = flags,
	};
	int rc = 0;

	set = ptlrpc_prep_set();
	if (!set)
		return -ENOMEM;

	oinfo.oi_osfs = osfs;
	oinfo.oi_flags = flags;
	rc = obd_statfs_async(exp, &oinfo, max_age, set);
	if (rc == 0)
		rc = ptlrpc_set_wait(set);
+0 −1
Original line number Diff line number Diff line
@@ -44,7 +44,6 @@ enum obd_notify_event;
struct inode;
struct lov_stripe_md;
struct lustre_md;
struct obd_capa;
struct obd_device;
struct obd_export;
struct page;
+4 −3
Original line number Diff line number Diff line
@@ -1033,7 +1033,10 @@ static int lov_statfs(const struct lu_env *env, struct obd_export *exp,
		      struct obd_statfs *osfs, __u64 max_age, __u32 flags)
{
	struct ptlrpc_request_set *set = NULL;
	struct obd_info oinfo = { };
	struct obd_info oinfo = {
		.oi_osfs = osfs,
		.oi_flags = flags,
	};
	int rc = 0;

	/* for obdclass we forbid using obd_statfs_rqset, but prefer using async
@@ -1043,8 +1046,6 @@ static int lov_statfs(const struct lu_env *env, struct obd_export *exp,
	if (!set)
		return -ENOMEM;

	oinfo.oi_osfs = osfs;
	oinfo.oi_flags = flags;
	rc = lov_statfs_async(exp, &oinfo, max_age, set);
	if (rc == 0)
		rc = ptlrpc_set_wait(set);
+0 −2
Original line number Diff line number Diff line
@@ -60,8 +60,6 @@ void lov_finish_set(struct lov_request_set *set)
							 rq_link);
		list_del_init(&req->rq_link);

		if (req->rq_oi.oi_oa)
			kmem_cache_free(obdo_cachep, req->rq_oi.oi_oa);
		kfree(req->rq_oi.oi_osfs);
		kfree(req);
	}
Loading