All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: Jens Axboe <axboe@suse.de>,
	James Bottomley <James.Bottomley@SteelEye.com>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>,
	Masao Fukuchi <fukuchi.masao@jp.fujitsu.com>
Subject: Re: [PATCH] improvement of fastfail operation
Date: Wed, 31 Mar 2004 23:53:33 -0800	[thread overview]
Message-ID: <406BCA7D.40208@cs.wisc.edu> (raw)
In-Reply-To: <406BC50E.6090100@us.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]

Mike Christie wrote:
> On Wed, Mar 31 2004, Mike Christie wrote:
> 
>> Jens Axboe wrote:
>> >On Wed, Mar 31 2004, James Bottomley wrote:
>> >
>> >>On Wed, 2004-03-31 at 17:04, Jens Axboe wrote:
>> >>
>> >>>So the new patch you sent with this mail is no good. Your previous one
>> >>>should be adopted ;-)
>> >>
>> >>And the:
>> >>
>> >>
>> >>        if (blk_pc_request(req))
>> >>            leftover = req->data_len - bytes;
>> >>
>> >>Since end_that_request chunk won't muck with that, is that OK?
>> >
>> >
>> >It's a bit messy right now really, but it's up to the drivers to modify
>> >that one. So for partial completions, it should be updated to be
>> >
>> >    leftover = req->data_len;
>> >
>> >as well.
>> >
>>
>> Is that a typo? If drivers are to account for it, scsi should do
>>     leftover = req->data_len - bytes;
>> ?
> 
> 
> No, scsi_io_completion() should already have done it.
> 

Oops. Thanks.


James,

The attached patch fixes the leftover calculation for both
blk pc and blk fs requests per Jens's comments. It was
built against 2.6.5-rc3.

Thanks,

Mike

[-- Attachment #2: calc_leftovers.patch --]
[-- Type: text/plain, Size: 608 bytes --]

--- linux-2.6.5-rc3/drivers/scsi/scsi_lib.c	2004-03-29 19:26:15.000000000 -0800
+++ linux-2.6.5-rc3-work/drivers/scsi/scsi_lib.c	2004-03-31 23:23:20.051292415 -0800
@@ -524,10 +524,10 @@ static struct scsi_cmnd *scsi_end_reques
 	 * to queue the remainder of them.
 	 */
 	if (end_that_request_chunk(req, uptodate, bytes)) {
-		int leftover = (req->hard_nr_sectors << 9) - bytes;
+		int leftover = req->hard_nr_sectors << 9;
 
 		if (blk_pc_request(req))
-			leftover = req->data_len - bytes;
+			leftover = req->data_len;
 
 		/* kill remainder if no retrys */
 		if (!uptodate && blk_noretry_request(req))

  parent reply	other threads:[~2004-04-01  7:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-24  0:38 [PATCH] improvement of fastfail operation Masao Fukuchi
2004-03-27 15:57 ` James Bottomley
2004-03-29 10:20   ` Mike Christie
2004-03-29 12:17   ` Masao Fukuchi
2004-03-31  1:29     ` James Bottomley
2004-03-31  5:14       ` Mike Christie
2004-03-31 22:04         ` Jens Axboe
2004-03-31 22:11           ` James Bottomley
2004-03-31 22:12             ` Jens Axboe
2004-03-31 23:15               ` Mike Christie
2004-04-01  6:47                 ` Jens Axboe
     [not found]                 ` <406BC50E.6090100@us.ibm.com>
2004-04-01  7:53                   ` Mike Christie [this message]
2004-04-01 15:06                     ` James Bottomley

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=406BCA7D.40208@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=James.Bottomley@SteelEye.com \
    --cc=axboe@suse.de \
    --cc=fukuchi.masao@jp.fujitsu.com \
    --cc=linux-scsi@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 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.