lkml.org 
[lkml]   [2008]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] block: fix residual byte count handling
From
On Mon, 03 Mar 2008 18:21:13 +0900
Tejun Heo <htejun@gmail.com> wrote:

> FUJITA Tomonori wrote:
> >>> I can't see what changing the meaning of rq->data_len (and
> >>> investigating all the block drivers) gives us.
> >> No matter which way you go, you change the meaning of rq->data_len and
> >> you MUST inspect rq->data_len usage whichever way you go.
> >
> > The patch doens't change that rq->data_len means the true data
> > length. But yeah, it breaks rq->data_len == sum(sg). So it might break
> > some drivers.
>
> Yeah, that's what I was saying. You end up breaking one of the two
> assumptions. As sglist is getting modified for any driver if it has DMA
> alignment set, whether rq->data_len is adjusted together or not, sglist
> and data_len usages have to be audited.

My patch (well, James' original approach) doesn't affect drivers that
don't use drain buffer. rq->data_len still means the true data length
and rq->data_len is equal to sum(sg) for them. So right now we need to
audit only libata.

But your patch changes the meaning of rq->data_len. It affects all the
drivers. So it breaks non libata stuff, like the SMP handler. We need
to audit all the drivers.


\
 
 \ /
  Last update: 2008-03-03 13:27    [W:0.564 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site