From: Boaz Harrosh <bharrosh@panasas.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>,
Tejun Heo <tj@kernel.org>, James Smart <James.Smart@Emulex.Com>,
James Bottomley <James.Bottomley@hansenpartnership.com>,
linux-scsi <linux-sc>
Cc: FUJITA Tomonori <tomof@acm.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Jens Axboe <Jens.Axboe@oracle.com>
Subject: [PATCH] [SQUASHME] "FC Pass Thru support" fixed for block/for-2.6.31 tree
Date: Tue, 19 May 2009 12:18:51 +0300 [thread overview]
Message-ID: <4A12797B.2060901@panasas.com> (raw)
Hi Stephen below is the correct patch for the scsi-misc build
failure when merged after block/for-next branch.
(Note that current linux-next fix will not work)
Tejun please review?
James, I still think the easiest is to squash this into
The FC Pass Thru support patch and put it in a post-merge
tree.
---
From: Boaz Harrosh <bharrosh@panasas.com>
Subject: [PATCH] [SQUASHME] "FC Pass Thru support" fixed for block/for-2.6.31 tree
This patch should be squashed into:
[SCSI] FC Pass Thru support
If it needs to compile after Tejun's block-layer revamps
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
---
drivers/scsi/scsi_transport_fc.c | 20 ++++++++------------
1 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index 4df8c3c..41c90fe 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -3409,7 +3409,6 @@ fc_bsg_jobdone(struct fc_bsg_job *job)
struct request *req = job->req;
struct request *rsp = req->next_rq;
unsigned long flags;
- unsigned rsp_len = 0, req_len = blk_rq_bytes(req);
int err;
spin_lock_irqsave(&job->job_lock, flags);
@@ -3425,16 +3424,15 @@ fc_bsg_jobdone(struct fc_bsg_job *job)
job->req->sense_len = job->reply_len;
/* we assume all request payload was transferred, residual == 0 */
- req->data_len = 0;
+ req->resid_len = 0;
if (rsp) {
- rsp_len = blk_rq_bytes(rsp);
- BUG_ON(job->reply->reply_payload_rcv_len > rsp_len);
/* set reply (bidi) residual */
- rsp->data_len = (rsp_len - job->reply->reply_payload_rcv_len);
+ rsp->resid_len = blk_rq_bytes(rsp) -
+ job->reply->reply_payload_rcv_len;
}
- blk_end_bidi_request(req, err, req_len, rsp_len);
+ blk_end_request_all(req, err);
fc_destroy_bsgjob(job);
}
@@ -3496,7 +3494,7 @@ fc_bsg_map_buffer(struct fc_bsg_buffer *buf, struct request *req)
return -ENOMEM;
sg_init_table(buf->sg_list, req->nr_phys_segments);
buf->sg_cnt = blk_rq_map_sg(req->q, req, buf->sg_list);
- buf->payload_len = req->data_len;
+ buf->payload_len = blk_rq_bytes(req);
return 0;
}
@@ -3762,14 +3760,12 @@ fc_bsg_request_handler(struct request_queue *q, struct Scsi_Host *shost,
return;
while (!blk_queue_plugged(q)) {
- req = elv_next_request(q);
- if (!req)
- break;
-
if (rport && (rport->port_state == FC_PORTSTATE_BLOCKED))
break;
- blkdev_dequeue_request(req);
+ req = blk_fetch_request(q);
+ if (!req)
+ break;
if (rport && (rport->port_state != FC_PORTSTATE_ONLINE)) {
req->errors = -ENXIO;
--
1.6.2.1
WARNING: multiple messages have this Message-ID (diff)
From: Boaz Harrosh <bharrosh@panasas.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>,
Tejun Heo <tj@kernel.org>, James Smart <James.Smart@Emulex.Com>,
James Bottomley <James.Bottomley@hansenpartnership.com>,
linux-scsi <linux-scsi@vger.kernel.org>
Cc: FUJITA Tomonori <tomof@acm.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Jens Axboe <Jens.Axboe@oracle.com>
Subject: [PATCH] [SQUASHME] "FC Pass Thru support" fixed for block/for-2.6.31 tree
Date: Tue, 19 May 2009 12:18:51 +0300 [thread overview]
Message-ID: <4A12797B.2060901@panasas.com> (raw)
Hi Stephen below is the correct patch for the scsi-misc build
failure when merged after block/for-next branch.
(Note that current linux-next fix will not work)
Tejun please review?
James, I still think the easiest is to squash this into
The FC Pass Thru support patch and put it in a post-merge
tree.
---
From: Boaz Harrosh <bharrosh@panasas.com>
Subject: [PATCH] [SQUASHME] "FC Pass Thru support" fixed for block/for-2.6.31 tree
This patch should be squashed into:
[SCSI] FC Pass Thru support
If it needs to compile after Tejun's block-layer revamps
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
---
drivers/scsi/scsi_transport_fc.c | 20 ++++++++------------
1 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index 4df8c3c..41c90fe 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -3409,7 +3409,6 @@ fc_bsg_jobdone(struct fc_bsg_job *job)
struct request *req = job->req;
struct request *rsp = req->next_rq;
unsigned long flags;
- unsigned rsp_len = 0, req_len = blk_rq_bytes(req);
int err;
spin_lock_irqsave(&job->job_lock, flags);
@@ -3425,16 +3424,15 @@ fc_bsg_jobdone(struct fc_bsg_job *job)
job->req->sense_len = job->reply_len;
/* we assume all request payload was transferred, residual == 0 */
- req->data_len = 0;
+ req->resid_len = 0;
if (rsp) {
- rsp_len = blk_rq_bytes(rsp);
- BUG_ON(job->reply->reply_payload_rcv_len > rsp_len);
/* set reply (bidi) residual */
- rsp->data_len = (rsp_len - job->reply->reply_payload_rcv_len);
+ rsp->resid_len = blk_rq_bytes(rsp) -
+ job->reply->reply_payload_rcv_len;
}
- blk_end_bidi_request(req, err, req_len, rsp_len);
+ blk_end_request_all(req, err);
fc_destroy_bsgjob(job);
}
@@ -3496,7 +3494,7 @@ fc_bsg_map_buffer(struct fc_bsg_buffer *buf, struct request *req)
return -ENOMEM;
sg_init_table(buf->sg_list, req->nr_phys_segments);
buf->sg_cnt = blk_rq_map_sg(req->q, req, buf->sg_list);
- buf->payload_len = req->data_len;
+ buf->payload_len = blk_rq_bytes(req);
return 0;
}
@@ -3762,14 +3760,12 @@ fc_bsg_request_handler(struct request_queue *q, struct Scsi_Host *shost,
return;
while (!blk_queue_plugged(q)) {
- req = elv_next_request(q);
- if (!req)
- break;
-
if (rport && (rport->port_state == FC_PORTSTATE_BLOCKED))
break;
- blkdev_dequeue_request(req);
+ req = blk_fetch_request(q);
+ if (!req)
+ break;
if (rport && (rport->port_state != FC_PORTSTATE_ONLINE)) {
req->errors = -ENXIO;
--
1.6.2.1
next reply other threads:[~2009-05-19 9:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-19 9:18 Boaz Harrosh [this message]
2009-05-19 9:18 ` [PATCH] [SQUASHME] "FC Pass Thru support" fixed for block/for-2.6.31 tree Boaz Harrosh
2009-05-19 10:05 ` Tejun Heo
2009-05-19 10:14 ` Boaz Harrosh
2009-05-19 12:54 ` [PATCH version 2] " Boaz Harrosh
2009-05-19 12:54 ` Boaz Harrosh
2009-05-20 1:16 ` Stephen Rothwell
2009-05-20 8:11 ` Boaz Harrosh
2009-05-20 12:54 ` James Smart
2009-05-20 14:37 ` James Bottomley
2009-05-20 14:42 ` Stephen Rothwell
2009-05-20 14:47 ` James Bottomley
2009-05-20 16:20 ` James Bottomley
2009-05-20 16:39 ` Boaz Harrosh
2009-05-20 16:40 ` Boaz Harrosh
2009-05-20 16:43 ` James Bottomley
2009-05-20 16:59 ` Boaz Harrosh
2009-05-20 17:03 ` Boaz Harrosh
2009-05-20 17:11 ` James Bottomley
2009-05-20 14:45 ` Stephen Rothwell
2009-05-20 19:10 ` Jens Axboe
2009-05-20 4:16 ` Stephen Rothwell
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=4A12797B.2060901@panasas.com \
--to=bharrosh@panasas.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=James.Smart@Emulex.Com \
--cc=Jens.Axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=tj@kernel.org \
--cc=tomof@acm.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 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.