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

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

staging: lustre: lmv: assume a real connection in lmv_connect()



Assume a real connection in lmv_connect(). Mark OBD_CONNECT_REAL
obsolete. Remove the then unnecessary refcount and exp members of
struct lmv_obd. Remove calls to lmv_check_connect(). Disconnect the
export in the appropriate error path of lmv_connect().

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


Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarwangdi <di.wang@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d902f2e8
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1122,7 +1122,7 @@ struct ptlrpc_body_v2 {
#define OBD_CONNECT_AT		    0x1000000ULL /*client uses AT */
#define OBD_CONNECT_AT		    0x1000000ULL /*client uses AT */
#define OBD_CONNECT_LRU_RESIZE      0x2000000ULL /*LRU resize feature. */
#define OBD_CONNECT_LRU_RESIZE      0x2000000ULL /*LRU resize feature. */
#define OBD_CONNECT_MDS_MDS	    0x4000000ULL /*MDS-MDS connection */
#define OBD_CONNECT_MDS_MDS	    0x4000000ULL /*MDS-MDS connection */
#define OBD_CONNECT_REAL	    0x8000000ULL /*real connection */
#define OBD_CONNECT_REAL	    0x8000000ULL /* obsolete since 2.8 */
#define OBD_CONNECT_CHANGE_QS      0x10000000ULL /*Not used since 2.4 */
#define OBD_CONNECT_CHANGE_QS      0x10000000ULL /*Not used since 2.4 */
#define OBD_CONNECT_CKSUM	   0x20000000ULL /*support several cksum algos*/
#define OBD_CONNECT_CKSUM	   0x20000000ULL /*support several cksum algos*/
#define OBD_CONNECT_FID		   0x40000000ULL /*FID is supported by server */
#define OBD_CONNECT_FID		   0x40000000ULL /*FID is supported by server */
+0 −2
Original line number Original line Diff line number Diff line
@@ -404,12 +404,10 @@ struct lmv_tgt_desc {
};
};


struct lmv_obd {
struct lmv_obd {
	int			refcount;
	struct lu_client_fld	lmv_fld;
	struct lu_client_fld	lmv_fld;
	spinlock_t		lmv_lock;
	spinlock_t		lmv_lock;
	struct lmv_desc		desc;
	struct lmv_desc		desc;
	struct obd_uuid		cluuid;
	struct obd_uuid		cluuid;
	struct obd_export	*exp;


	struct mutex		lmv_init_mutex;
	struct mutex		lmv_init_mutex;
	int			connected;
	int			connected;
+0 −3
Original line number Original line Diff line number Diff line
@@ -222,9 +222,6 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
	else
	else
		sbi->ll_fop = &ll_file_operations_noflock;
		sbi->ll_fop = &ll_file_operations_noflock;


	/* real client */
	data->ocd_connect_flags |= OBD_CONNECT_REAL;

	/* always ping even if server suppress_pings */
	/* always ping even if server suppress_pings */
	if (sbi->ll_flags & LL_SBI_ALWAYS_PING)
	if (sbi->ll_flags & LL_SBI_ALWAYS_PING)
		data->ocd_connect_flags &= ~OBD_CONNECT_PINGLESS;
		data->ocd_connect_flags &= ~OBD_CONNECT_PINGLESS;
+0 −5
Original line number Original line Diff line number Diff line
@@ -474,7 +474,6 @@ int lmv_intent_lock(struct obd_export *exp, struct md_op_data *op_data,
		    ldlm_blocking_callback cb_blocking,
		    ldlm_blocking_callback cb_blocking,
		    __u64 extra_lock_flags)
		    __u64 extra_lock_flags)
{
{
	struct obd_device *obd = exp->exp_obd;
	int		rc;
	int		rc;


	LASSERT(fid_is_sane(&op_data->op_fid1));
	LASSERT(fid_is_sane(&op_data->op_fid1));
@@ -484,10 +483,6 @@ int lmv_intent_lock(struct obd_export *exp, struct md_op_data *op_data,
	       (int)op_data->op_namelen, op_data->op_name,
	       (int)op_data->op_namelen, op_data->op_name,
	       PFID(&op_data->op_fid1));
	       PFID(&op_data->op_fid1));


	rc = lmv_check_connect(obd);
	if (rc)
		return rc;

	if (it->it_op & (IT_LOOKUP | IT_GETATTR | IT_LAYOUT))
	if (it->it_op & (IT_LOOKUP | IT_GETATTR | IT_LAYOUT))
		rc = lmv_intent_lookup(exp, op_data, it, reqp, cb_blocking,
		rc = lmv_intent_lookup(exp, op_data, it, reqp, cb_blocking,
				       extra_lock_flags);
				       extra_lock_flags);
+0 −2
Original line number Original line Diff line number Diff line
@@ -42,8 +42,6 @@
#define LL_IT2STR(it)					\
#define LL_IT2STR(it)					\
	((it) ? ldlm_it2str((it)->it_op) : "0")
	((it) ? ldlm_it2str((it)->it_op) : "0")


int lmv_check_connect(struct obd_device *obd);

int lmv_intent_lock(struct obd_export *exp, struct md_op_data *op_data,
int lmv_intent_lock(struct obd_export *exp, struct md_op_data *op_data,
		    struct lookup_intent *it, struct ptlrpc_request **reqp,
		    struct lookup_intent *it, struct ptlrpc_request **reqp,
		    ldlm_blocking_callback cb_blocking,
		    ldlm_blocking_callback cb_blocking,
Loading