From: Steffen Maier <maier@linux.vnet.ibm.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Steffen Maier <maier@linux.vnet.ibm.com>,
linux-scsi@vger.kernel.org, linux-s390@vger.kernel.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
stable@vger.kernel.org
Subject: [PATCH RESEND 6/9] zfcp: block queue limits with data router
Date: Fri, 26 Apr 2013 17:33:45 +0200 [thread overview]
Message-ID: <517A9E59.5060806@linux.vnet.ibm.com> (raw)
In-Reply-To: <1366985635-38270-7-git-send-email-maier@linux.vnet.ibm.com>
Commit 86a9668a8d29ea711613e1cb37efa68e7c4db564
"[SCSI] zfcp: support for hardware data router"
reduced the initial block queue limits in the scsi_host_template to the
absolute minimum and adjusted them later on. However, the adjustment was
too late for the BSG devices of Scsi_Host and fc_host.
Therefore, ioctl(..., SG_IO, ...) with request or response size > 4kB to a
BSG device of an fc_host or a Scsi_Host fails with EINVAL. As a result,
users of such ioctl such as HBA_SendCTPassThru() in libzfcphbaapi return
with error HBA_STATUS_ERROR.
Initialize the block queue limits in zfcp_scsi_host_template to the
greatest common denominator (GCD).
While we cannot exploit the slightly enlarged maximum request size with
data router, this should be neglectible. Doing so also avoids running into
trouble after live guest relocation (LGR) / migration from a data router
FCP device to an FCP device that does not support data router. In that
case, zfcp would figure out the new limits on adapter recovery, but the
fc_host and Scsi_Host (plus in fact all sdevs) still exist with the old and
now too large queue limits.
It should also OK, not to use half the size as in the DIX case, because
fc_host and Scsi_Host do not transport FCP requests including SCSI commands
using protection data.
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Reviewed-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Cc: <stable@vger.kernel.org> #3.2+
---
drivers/s390/scsi/zfcp_scsi.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -3,7 +3,7 @@
*
* Interface to Linux SCSI midlayer.
*
- * Copyright IBM Corp. 2002, 2010
+ * Copyright IBM Corp. 2002, 2013
*/
#define KMSG_COMPONENT "zfcp"
@@ -311,8 +311,12 @@ static struct scsi_host_template zfcp_sc
.proc_name = "zfcp",
.can_queue = 4096,
.this_id = -1,
- .sg_tablesize = 1, /* adjusted later */
- .max_sectors = 8, /* adjusted later */
+ .sg_tablesize = (((QDIO_MAX_ELEMENTS_PER_BUFFER - 1)
+ * ZFCP_QDIO_MAX_SBALS_PER_REQ) - 2),
+ /* GCD, adjusted later */
+ .max_sectors = (((QDIO_MAX_ELEMENTS_PER_BUFFER - 1)
+ * ZFCP_QDIO_MAX_SBALS_PER_REQ) - 2) * 8,
+ /* GCD, adjusted later */
.dma_boundary = ZFCP_QDIO_SBALE_LEN - 1,
.cmd_per_lun = 1,
.use_clustering = 1,
next prev parent reply other threads:[~2013-04-26 15:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-26 14:13 [PATCH RESEND 0/9] zfcp features and bugfixes for 3.10 merge window Steffen Maier
2013-04-26 14:13 ` [PATCH RESEND 1/9] zfcp: cfdc fops add owner Steffen Maier
2013-04-26 14:13 ` [PATCH RESEND 2/9] zfcp: cleanup port sysfs attribute usage Steffen Maier
2013-04-26 14:13 ` [PATCH RESEND 3/9] zfcp: cleanup unit " Steffen Maier
2013-04-26 14:13 ` [PATCH RESEND 4/9] zfcp: remove unused device_unregister wrapper Steffen Maier
2013-04-26 14:13 ` [PATCH RESEND 7/9] zfcp: module parameter dbflevel for early debugging Steffen Maier
2013-04-26 14:13 ` [PATCH RESEND 8/9] zfcp: remove access control tables interface Steffen Maier
2013-04-26 15:10 ` [PATCH RESEND 0/9] zfcp features and bugfixes for 3.10 merge window James Bottomley
2013-04-26 15:44 ` Steffen Maier
2013-04-26 16:10 ` James Bottomley
2013-04-27 9:44 ` Heiko Carstens
[not found] ` <1366985635-38270-6-git-send-email-maier@linux.vnet.ibm.com>
2013-04-26 15:32 ` [PATCH RESEND 5/9] zfcp: fix adapter (re)open recovery while link to SAN is down Steffen Maier
[not found] ` <1366985635-38270-7-git-send-email-maier@linux.vnet.ibm.com>
2013-04-26 15:33 ` Steffen Maier [this message]
[not found] ` <1366985635-38270-10-git-send-email-maier@linux.vnet.ibm.com>
2013-04-26 15:34 ` [PATCH RESEND 9/9] zfcp: status read buffers on first adapter open with link down Steffen Maier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=517A9E59.5060806@linux.vnet.ibm.com \
--to=maier@linux.vnet.ibm.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).