All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 0/3] zfcp patches for 2.6.35-rc
@ 2010-06-21  8:11 Christof Schmitt
  2010-06-21  8:11 ` [patch 1/3] zfcp: Fix check whether unchained ct_els is possible Christof Schmitt
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Christof Schmitt @ 2010-06-21  8:11 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi, linux-s390, schwidefsky, heiko.carstens

James,

here are three zfcp bug fix patches for the current 2.6.35-rc cycle.
The patches apply cleanly on top of 2.6.35-rc3.

Christof

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [patch 1/3] zfcp: Fix check whether unchained ct_els is possible
  2010-06-21  8:11 [patch 0/3] zfcp patches for 2.6.35-rc Christof Schmitt
@ 2010-06-21  8:11 ` Christof Schmitt
  2010-06-21  8:11 ` [patch 2/3] zfcp: Do not wait for SBALs on stopped queue Christof Schmitt
  2010-06-21  8:11 ` [patch 3/3] zfcp: Update status read mempool Christof Schmitt
  2 siblings, 0 replies; 4+ messages in thread
From: Christof Schmitt @ 2010-06-21  8:11 UTC (permalink / raw)
  To: James Bottomley
  Cc: linux-scsi, linux-s390, schwidefsky, heiko.carstens,
	Swen Schillig, Christof Schmitt

[-- Attachment #1: 701-zfcp-fallout.diff --]
[-- Type: text/plain, Size: 848 bytes --]

From: Swen Schillig <swen@vnet.ibm.com>

A false check was performed whether an unchained ct_els 
is possible or not.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
---

 drivers/s390/scsi/zfcp_fsf.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/s390/scsi/zfcp_fsf.c	2010-06-21 09:37:39.000000000 +0200
+++ b/drivers/s390/scsi/zfcp_fsf.c	2010-06-21 09:37:40.000000000 +0200
@@ -981,7 +981,7 @@ static int zfcp_fsf_setup_ct_els_sbals(s
 	}
 
 	/* use single, unchained SBAL if it can hold the request */
-	if (zfcp_qdio_sg_one_sbale(sg_req) || zfcp_qdio_sg_one_sbale(sg_resp)) {
+	if (zfcp_qdio_sg_one_sbale(sg_req) && zfcp_qdio_sg_one_sbale(sg_resp)) {
 		zfcp_fsf_setup_ct_els_unchained(adapter->qdio, &req->qdio_req,
 						sg_req, sg_resp);
 		return 0;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [patch 2/3] zfcp: Do not wait for SBALs on stopped queue
  2010-06-21  8:11 [patch 0/3] zfcp patches for 2.6.35-rc Christof Schmitt
  2010-06-21  8:11 ` [patch 1/3] zfcp: Fix check whether unchained ct_els is possible Christof Schmitt
@ 2010-06-21  8:11 ` Christof Schmitt
  2010-06-21  8:11 ` [patch 3/3] zfcp: Update status read mempool Christof Schmitt
  2 siblings, 0 replies; 4+ messages in thread
From: Christof Schmitt @ 2010-06-21  8:11 UTC (permalink / raw)
  To: James Bottomley
  Cc: linux-scsi, linux-s390, schwidefsky, heiko.carstens, Christof Schmitt

[-- Attachment #1: 702-zfcp-stopped-queue.diff --]
[-- Type: text/plain, Size: 2369 bytes --]

From: Christof Schmitt <christof.schmitt@de.ibm.com>

Trying to read the FC host statistics on an offline adapter results in
a 5 seconds wait. Reading the statistics tries to issue an exchange
port data request which first waits up to 5 seconds for an entry in 
the request queue.

Change the strategy for getting a free SBAL to exit when the queue is
stopped. Reading the statistics will then fail without the wait.

Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
---

 drivers/s390/scsi/zfcp_fsf.c  |    5 -----
 drivers/s390/scsi/zfcp_qdio.c |   10 +++++++++-
 2 files changed, 9 insertions(+), 6 deletions(-)

--- a/drivers/s390/scsi/zfcp_fsf.c	2010-06-21 09:37:40.000000000 +0200
+++ b/drivers/s390/scsi/zfcp_fsf.c	2010-06-21 09:37:43.000000000 +0200
@@ -719,11 +719,6 @@ static struct zfcp_fsf_req *zfcp_fsf_req
 	zfcp_qdio_req_init(adapter->qdio, &req->qdio_req, req->req_id, sbtype,
 			   req->qtcb, sizeof(struct fsf_qtcb));
 
-	if (!(atomic_read(&adapter->status) & ZFCP_STATUS_ADAPTER_QDIOUP)) {
-		zfcp_fsf_req_free(req);
-		return ERR_PTR(-EIO);
-	}
-
 	return req;
 }
 
--- a/drivers/s390/scsi/zfcp_qdio.c	2010-06-21 09:37:39.000000000 +0200
+++ b/drivers/s390/scsi/zfcp_qdio.c	2010-06-21 09:37:43.000000000 +0200
@@ -251,7 +251,8 @@ static int zfcp_qdio_sbal_check(struct z
 	struct zfcp_qdio_queue *req_q = &qdio->req_q;
 
 	spin_lock_bh(&qdio->req_q_lock);
-	if (atomic_read(&req_q->count))
+	if (atomic_read(&req_q->count) ||
+	    !(atomic_read(&qdio->adapter->status) & ZFCP_STATUS_ADAPTER_QDIOUP))
 		return 1;
 	spin_unlock_bh(&qdio->req_q_lock);
 	return 0;
@@ -274,8 +275,13 @@ int zfcp_qdio_sbal_get(struct zfcp_qdio 
 	spin_unlock_bh(&qdio->req_q_lock);
 	ret = wait_event_interruptible_timeout(qdio->req_q_wq,
 			       zfcp_qdio_sbal_check(qdio), 5 * HZ);
+
+	if (!(atomic_read(&qdio->adapter->status) & ZFCP_STATUS_ADAPTER_QDIOUP))
+		return -EIO;
+
 	if (ret > 0)
 		return 0;
+
 	if (!ret) {
 		atomic_inc(&qdio->req_q_full);
 		/* assume hanging outbound queue, try queue recovery */
@@ -375,6 +381,8 @@ void zfcp_qdio_close(struct zfcp_qdio *q
 	atomic_clear_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &qdio->adapter->status);
 	spin_unlock_bh(&qdio->req_q_lock);
 
+	wake_up(&qdio->req_q_wq);
+
 	qdio_shutdown(qdio->adapter->ccw_device,
 		      QDIO_FLAG_CLEANUP_USING_CLEAR);
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [patch 3/3] zfcp: Update status read mempool
  2010-06-21  8:11 [patch 0/3] zfcp patches for 2.6.35-rc Christof Schmitt
  2010-06-21  8:11 ` [patch 1/3] zfcp: Fix check whether unchained ct_els is possible Christof Schmitt
  2010-06-21  8:11 ` [patch 2/3] zfcp: Do not wait for SBALs on stopped queue Christof Schmitt
@ 2010-06-21  8:11 ` Christof Schmitt
  2 siblings, 0 replies; 4+ messages in thread
From: Christof Schmitt @ 2010-06-21  8:11 UTC (permalink / raw)
  To: James Bottomley
  Cc: linux-scsi, linux-s390, schwidefsky, heiko.carstens, Christof Schmitt

[-- Attachment #1: 703-zfcp-status-mempool.diff --]
[-- Type: text/plain, Size: 1933 bytes --]

From: Christof Schmitt <christof.schmitt@de.ibm.com>

Commit 64deb6efdc5504ce97b5c1c6f281fffbc150bd93 changed the way status
read buffers are handled but forgot to adjust the mempool to the new
size. Add the call to resize the mempool after the exchange config
data. Also use the define instead of the hard coded number in the fsf
callback for consistency.

Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
---

 drivers/s390/scsi/zfcp_erp.c |    8 ++++++++
 drivers/s390/scsi/zfcp_fsf.c |    3 ++-
 2 files changed, 10 insertions(+), 1 deletion(-)

--- a/drivers/s390/scsi/zfcp_erp.c	2010-06-21 09:37:39.000000000 +0200
+++ b/drivers/s390/scsi/zfcp_erp.c	2010-06-21 09:37:46.000000000 +0200
@@ -714,6 +714,14 @@ static int zfcp_erp_adapter_strategy_ope
 	if (zfcp_erp_adapter_strategy_open_fsf_xport(act) == ZFCP_ERP_FAILED)
 		return ZFCP_ERP_FAILED;
 
+	if (mempool_resize(act->adapter->pool.status_read_data,
+			   act->adapter->stat_read_buf_num, GFP_KERNEL))
+		return ZFCP_ERP_FAILED;
+
+	if (mempool_resize(act->adapter->pool.status_read_req,
+			   act->adapter->stat_read_buf_num, GFP_KERNEL))
+		return ZFCP_ERP_FAILED;
+
 	atomic_set(&act->adapter->stat_miss, act->adapter->stat_read_buf_num);
 	if (zfcp_status_read_refill(act->adapter))
 		return ZFCP_ERP_FAILED;
--- a/drivers/s390/scsi/zfcp_fsf.c	2010-06-21 09:37:43.000000000 +0200
+++ b/drivers/s390/scsi/zfcp_fsf.c	2010-06-21 09:37:46.000000000 +0200
@@ -496,7 +496,8 @@ static int zfcp_fsf_exchange_config_eval
 
 	adapter->hydra_version = bottom->adapter_type;
 	adapter->timer_ticks = bottom->timer_interval;
-	adapter->stat_read_buf_num = max(bottom->status_read_buf_num, (u16)16);
+	adapter->stat_read_buf_num = max(bottom->status_read_buf_num,
+					 (u16)FSF_STATUS_READS_RECOM);
 
 	if (fc_host_permanent_port_name(shost) == -1)
 		fc_host_permanent_port_name(shost) = fc_host_port_name(shost);

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-06-21  8:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-21  8:11 [patch 0/3] zfcp patches for 2.6.35-rc Christof Schmitt
2010-06-21  8:11 ` [patch 1/3] zfcp: Fix check whether unchained ct_els is possible Christof Schmitt
2010-06-21  8:11 ` [patch 2/3] zfcp: Do not wait for SBALs on stopped queue Christof Schmitt
2010-06-21  8:11 ` [patch 3/3] zfcp: Update status read mempool Christof Schmitt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.