Commit a3310525 authored by Mikhail Pershin's avatar Mikhail Pershin Committed by Greg Kroah-Hartman

staging/lustre: use osc_reply_portal for OUT services

OUT service is used to server both MDS-MDS updates and MDS-OST
therefore services on MDT and OST are set to use the same request
and reply portals to be fully unified and able to serve any type
of requests.
Signed-off-by: default avatarMikhail Pershin <mike.pershin@intel.com>
Reviewed-on: http://review.whamcloud.com/8390
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3467Reviewed-by: default avatarwangdi <di.wang@intel.com>
Reviewed-by: default avatarFan Yong <fan.yong@intel.com>
Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1cc30ab9
...@@ -426,6 +426,7 @@ int fld_client_rpc(struct obd_export *exp, ...@@ -426,6 +426,7 @@ int fld_client_rpc(struct obd_export *exp,
ptlrpc_request_set_replen(req); ptlrpc_request_set_replen(req);
req->rq_request_portal = FLD_REQUEST_PORTAL; req->rq_request_portal = FLD_REQUEST_PORTAL;
req->rq_reply_portal = MDC_REPLY_PORTAL;
ptlrpc_at_set_req_timeout(req); ptlrpc_at_set_req_timeout(req);
if (fld_op == FLD_LOOKUP && if (fld_op == FLD_LOOKUP &&
......
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
//#define PTLBD_BULK_PORTAL 21 //#define PTLBD_BULK_PORTAL 21
#define MDS_SETATTR_PORTAL 22 #define MDS_SETATTR_PORTAL 22
#define MDS_READPAGE_PORTAL 23 #define MDS_READPAGE_PORTAL 23
#define MDS_MDS_PORTAL 24 #define OUT_PORTAL 24
#define MGC_REPLY_PORTAL 25 #define MGC_REPLY_PORTAL 25
#define MGS_REQUEST_PORTAL 26 #define MGS_REQUEST_PORTAL 26
......
...@@ -267,15 +267,10 @@ int client_obd_setup(struct obd_device *obddev, struct lustre_cfg *lcfg) ...@@ -267,15 +267,10 @@ int client_obd_setup(struct obd_device *obddev, struct lustre_cfg *lcfg)
char *name = obddev->obd_type->typ_name; char *name = obddev->obd_type->typ_name;
ldlm_ns_type_t ns_type = LDLM_NS_TYPE_UNKNOWN; ldlm_ns_type_t ns_type = LDLM_NS_TYPE_UNKNOWN;
int rc; int rc;
char *cli_name = lustre_cfg_buf(lcfg, 0);
/* In a more perfect world, we would hang a ptlrpc_client off of /* In a more perfect world, we would hang a ptlrpc_client off of
* obd_type and just use the values from there. */ * obd_type and just use the values from there. */
if (!strcmp(name, LUSTRE_OSC_NAME) || if (!strcmp(name, LUSTRE_OSC_NAME)) {
(!(strcmp(name, LUSTRE_OSP_NAME)) &&
(is_osp_on_mdt(cli_name) &&
strstr(lustre_cfg_buf(lcfg, 1), "OST") != NULL))) {
/* OSC or OSP_on_MDT for OSTs */
rq_portal = OST_REQUEST_PORTAL; rq_portal = OST_REQUEST_PORTAL;
rp_portal = OSC_REPLY_PORTAL; rp_portal = OSC_REPLY_PORTAL;
connect_op = OST_CONNECT; connect_op = OST_CONNECT;
...@@ -283,17 +278,29 @@ int client_obd_setup(struct obd_device *obddev, struct lustre_cfg *lcfg) ...@@ -283,17 +278,29 @@ int client_obd_setup(struct obd_device *obddev, struct lustre_cfg *lcfg)
cli->cl_sp_to = LUSTRE_SP_OST; cli->cl_sp_to = LUSTRE_SP_OST;
ns_type = LDLM_NS_TYPE_OSC; ns_type = LDLM_NS_TYPE_OSC;
} else if (!strcmp(name, LUSTRE_MDC_NAME) || } else if (!strcmp(name, LUSTRE_MDC_NAME) ||
!strcmp(name, LUSTRE_LWP_NAME) || !strcmp(name, LUSTRE_LWP_NAME)) {
(!strcmp(name, LUSTRE_OSP_NAME) &&
(is_osp_on_mdt(cli_name) &&
strstr(lustre_cfg_buf(lcfg, 1), "OST") == NULL))) {
/* MDC or OSP_on_MDT for other MDTs */
rq_portal = MDS_REQUEST_PORTAL; rq_portal = MDS_REQUEST_PORTAL;
rp_portal = MDC_REPLY_PORTAL; rp_portal = MDC_REPLY_PORTAL;
connect_op = MDS_CONNECT; connect_op = MDS_CONNECT;
cli->cl_sp_me = LUSTRE_SP_CLI; cli->cl_sp_me = LUSTRE_SP_CLI;
cli->cl_sp_to = LUSTRE_SP_MDT; cli->cl_sp_to = LUSTRE_SP_MDT;
ns_type = LDLM_NS_TYPE_MDC; ns_type = LDLM_NS_TYPE_MDC;
} else if (!strcmp(name, LUSTRE_OSP_NAME)) {
if (strstr(lustre_cfg_buf(lcfg, 1), "OST") == NULL) {
/* OSP_on_MDT for other MDTs */
connect_op = MDS_CONNECT;
cli->cl_sp_to = LUSTRE_SP_MDT;
ns_type = LDLM_NS_TYPE_MDC;
rq_portal = OUT_PORTAL;
} else {
/* OSP on MDT for OST */
connect_op = OST_CONNECT;
cli->cl_sp_to = LUSTRE_SP_OST;
ns_type = LDLM_NS_TYPE_OSC;
rq_portal = OST_REQUEST_PORTAL;
}
rp_portal = OSC_REPLY_PORTAL;
cli->cl_sp_me = LUSTRE_SP_CLI;
} else if (!strcmp(name, LUSTRE_MGC_NAME)) { } else if (!strcmp(name, LUSTRE_MGC_NAME)) {
rq_portal = MGS_REQUEST_PORTAL; rq_portal = MGS_REQUEST_PORTAL;
rp_portal = MGC_REPLY_PORTAL; rp_portal = MGC_REPLY_PORTAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment