aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_dbf.c
diff options
context:
space:
mode:
authorSwen Schillig <swen@vnet.ibm.com>2008-10-01 06:42:17 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-10-03 13:11:53 -0400
commit5ab944f97e09a3d52951fe903eed9a7b88d810b2 (patch)
tree266171323bd7c5dfc433efd70ca19aafc891598c /drivers/s390/scsi/zfcp_dbf.c
parent44cc76f2d154aa24340354b4711a0fe7f8f08adc (diff)
[SCSI] zfcp: attach and release SAN nameserver port on demand
Changing the zfcp behaviour from always having the nameserver port open to an on-demand strategy. This strategy reduces the use of limited resources like port connections. The patch provides a common infrastructure which could be used for all WKA ports in future. Also reduce the number of nameserver lookups by changing the zfcp behaviour of always querying the nameserver for the corresponding destination ID of the remote port. If the destination ID has changed during the reopen process we will be informed and then trigger a nameserver query on demand. Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_dbf.c')
-rw-r--r--drivers/s390/scsi/zfcp_dbf.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c
index d088d30516f9..c1f69f611e69 100644
--- a/drivers/s390/scsi/zfcp_dbf.c
+++ b/drivers/s390/scsi/zfcp_dbf.c
@@ -519,7 +519,7 @@ static const char *zfcp_rec_dbf_ids[] = {
519 [75] = "physical port recovery escalation after failed port " 519 [75] = "physical port recovery escalation after failed port "
520 "recovery", 520 "recovery",
521 [76] = "port recovery escalation after failed unit recovery", 521 [76] = "port recovery escalation after failed unit recovery",
522 [77] = "recovery opening nameserver port", 522 [77] = "",
523 [78] = "duplicate request id", 523 [78] = "duplicate request id",
524 [79] = "link down", 524 [79] = "link down",
525 [80] = "exclusive read-only unit access unsupported", 525 [80] = "exclusive read-only unit access unsupported",
@@ -829,8 +829,8 @@ void zfcp_rec_dbf_event_action(u8 id2, struct zfcp_erp_action *erp_action)
829void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *fsf_req) 829void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *fsf_req)
830{ 830{
831 struct zfcp_send_ct *ct = (struct zfcp_send_ct *)fsf_req->data; 831 struct zfcp_send_ct *ct = (struct zfcp_send_ct *)fsf_req->data;
832 struct zfcp_port *port = ct->port; 832 struct zfcp_wka_port *wka_port = ct->wka_port;
833 struct zfcp_adapter *adapter = port->adapter; 833 struct zfcp_adapter *adapter = wka_port->adapter;
834 struct ct_hdr *hdr = sg_virt(ct->req); 834 struct ct_hdr *hdr = sg_virt(ct->req);
835 struct zfcp_san_dbf_record *r = &adapter->san_dbf_buf; 835 struct zfcp_san_dbf_record *r = &adapter->san_dbf_buf;
836 struct zfcp_san_dbf_record_ct_request *oct = &r->u.ct_req; 836 struct zfcp_san_dbf_record_ct_request *oct = &r->u.ct_req;
@@ -842,7 +842,7 @@ void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *fsf_req)
842 r->fsf_reqid = (unsigned long)fsf_req; 842 r->fsf_reqid = (unsigned long)fsf_req;
843 r->fsf_seqno = fsf_req->seq_no; 843 r->fsf_seqno = fsf_req->seq_no;
844 r->s_id = fc_host_port_id(adapter->scsi_host); 844 r->s_id = fc_host_port_id(adapter->scsi_host);
845 r->d_id = port->d_id; 845 r->d_id = wka_port->d_id;
846 oct->cmd_req_code = hdr->cmd_rsp_code; 846 oct->cmd_req_code = hdr->cmd_rsp_code;
847 oct->revision = hdr->revision; 847 oct->revision = hdr->revision;
848 oct->gs_type = hdr->gs_type; 848 oct->gs_type = hdr->gs_type;
@@ -863,8 +863,8 @@ void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *fsf_req)
863void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *fsf_req) 863void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *fsf_req)
864{ 864{
865 struct zfcp_send_ct *ct = (struct zfcp_send_ct *)fsf_req->data; 865 struct zfcp_send_ct *ct = (struct zfcp_send_ct *)fsf_req->data;
866 struct zfcp_port *port = ct->port; 866 struct zfcp_wka_port *wka_port = ct->wka_port;
867 struct zfcp_adapter *adapter = port->adapter; 867 struct zfcp_adapter *adapter = wka_port->adapter;
868 struct ct_hdr *hdr = sg_virt(ct->resp); 868 struct ct_hdr *hdr = sg_virt(ct->resp);
869 struct zfcp_san_dbf_record *r = &adapter->san_dbf_buf; 869 struct zfcp_san_dbf_record *r = &adapter->san_dbf_buf;
870 struct zfcp_san_dbf_record_ct_response *rct = &r->u.ct_resp; 870 struct zfcp_san_dbf_record_ct_response *rct = &r->u.ct_resp;
@@ -875,7 +875,7 @@ void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *fsf_req)
875 strncpy(r->tag, "rctc", ZFCP_DBF_TAG_SIZE); 875 strncpy(r->tag, "rctc", ZFCP_DBF_TAG_SIZE);
876 r->fsf_reqid = (unsigned long)fsf_req; 876 r->fsf_reqid = (unsigned long)fsf_req;
877 r->fsf_seqno = fsf_req->seq_no; 877 r->fsf_seqno = fsf_req->seq_no;
878 r->s_id = port->d_id; 878 r->s_id = wka_port->d_id;
879 r->d_id = fc_host_port_id(adapter->scsi_host); 879 r->d_id = fc_host_port_id(adapter->scsi_host);
880 rct->cmd_rsp_code = hdr->cmd_rsp_code; 880 rct->cmd_rsp_code = hdr->cmd_rsp_code;
881 rct->revision = hdr->revision; 881 rct->revision = hdr->revision;