linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Borislav Petkov <petkovbb@gmail.com>,
	Tejun Heo <htejun@gmail.com>, Jens Axboe <jens.axboe@oracle.com>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	Boaz Harrosh <bharrosh>
Subject: Re: [PATCH block#for-2.6.31 2/3] block: set rq->resid_len to	blk_rq_bytes() on issue
Date: Sat, 16 May 2009 22:52:24 +0900	[thread overview]
Message-ID: <4A0EC518.3030401@gmail.com> (raw)
In-Reply-To: <20090516071305.GA4921@liondog.tnic>

Hello, Borislav.

Borislav Petkov wrote:
> On Sat, May 16, 2009 at 12:18:42AM +0900, Tejun Heo wrote:
>> In commit c3a4d78c580de4edc9ef0f7c59812fb02ceb037f, while introducing
>> rq->resid_len, the default value of residue count was changed from
>> full count to zero.  The conversion was done under the assumption that
>> when a request fails residue count wasn't defined.  However, Boaz and
>> James pointed out that this wasn't true and the residue count should
>> be preserved for failed requests too.
>>
>> This patchset restores the original behavior by setting rq->resid_len
>> to blk_rq_bytes(rq) on issue and restoring explicit clearing in
>> affected drivers.  While at it, take advantage of the fact that
>> rq->resid_len is set to full count where applicable.
>>
>> * ide-cd: rq->resid_len cleared on pc success
>>
>> * mptsas: req->resid_len cleared on success
>>
>> * sas_expander: rsp/req->resid_len cleared on success
>>
>> * mpt2sas_transport: req->resid_len cleared on success
>>
>> * ide-cd, ide-tape, mptsas, sas_host_smp, mpt2sas_transport, ub: take
>>   advantage of initial full count to simplify code
> 
> ACK the ide-{cd,tape} bits.
> 
> Acked-by: Borislav Petkov <petkovbb@gmail.com>
> 
> I've converted the ide-atapi part to rq->resid_len and from what I see,

Sorry it changed underneath your changes.

> the changes are compatible with the latest semantics of rq->resid_len
> but it won't hurt if you could take a look too :) :
>
> http://git.kernel.org/?p=linux/kernel/git/bp/bp.git;a=commit;h=077e6dba20e74a455a0452379d2a965c7e1b01ad

Yeap, I'll take a look.

> On a side note, ide_pc_intr() does some transfer padding but that
> doesn't affect rq->resid_len returning the remaining bytecount back up
> to block layer.

Hmmm... telling the issuer the actual number of transferred bytes sans
padding is the correct behavior, I think.

Thanks.

-- 
tejun

  reply	other threads:[~2009-05-16 13:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-15 15:14 [PATCH block#for-2.6.31 1/3] ub: use __blk_end_request_all() Tejun Heo
2009-05-15 15:18 ` [PATCH block#for-2.6.31 2/3] block: set rq->resid_len to blk_rq_bytes() on issue Tejun Heo
2009-05-15 15:19   ` [PATCH block#for-2.6.31 3/3] bio: always copy back data for copied kernel requests Tejun Heo
2009-05-15 15:38   ` [PATCH block#for-2.6.31 2/3] block: set rq->resid_len to blk_rq_bytes() on issue Sergei Shtylyov
2009-05-15 22:18     ` Tejun Heo
2009-05-16 12:29       ` Sergei Shtylyov
2009-05-16 13:48         ` Tejun Heo
2009-05-15 17:29   ` Pete Zaitcev
2009-05-15 22:14     ` Tejun Heo
2009-05-15 23:16       ` Pete Zaitcev
2009-05-16  0:14         ` Tejun Heo
2009-05-16  0:18   ` [PATCH UPDATED " Tejun Heo
2009-05-17  8:48     ` Boaz Harrosh
2009-05-17 11:32       ` Tejun Heo
2009-05-17 11:41         ` Tejun Heo
2009-05-17 12:05     ` [PATCH UPDATED2 " Tejun Heo
     [not found]     ` <4A0FFD7E.8050607@gmail.com>
2009-05-18 12:49       ` Jens Axboe
2009-05-19  9:14         ` Tejun Heo
2009-05-19  9:17           ` Jens Axboe
2009-05-16  7:13   ` [PATCH " Borislav Petkov
2009-05-16 13:52     ` Tejun Heo [this message]
2009-05-15 17:31 ` [PATCH block#for-2.6.31 1/3] ub: use __blk_end_request_all() Pete Zaitcev
2009-05-15 22:19   ` Tejun Heo

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=4A0EC518.3030401@gmail.com \
    --to=htejun@gmail.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=jens.axboe@oracle.com \
    --cc=petkovbb@gmail.com \
    /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).