lkml.org 
[lkml]   [2009]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 02/14] ide-atapi: switch to blk_rq_bytes() on do_request() path
Date
On Saturday 09 May 2009 09:45:22 Borislav Petkov wrote:
> After the recent struct request cleanups, blk_rq_bytes() is guaranteed
> to be valid and is the current total length of the rq's bio. Use that
> instead of pc->req_xfer in the do_request() path after the command has
> been queued.
>
> The remaining usage of pc->req_xfer now is only until we map the rq to a
> bio.
>
> While at it:
>
> - remove local caching of rq completion length in ide_tape_issue_pc()
>
> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
> ---
> drivers/ide/ide-atapi.c | 12 +++++++-----
> drivers/ide/ide-floppy.c | 8 ++++----
> drivers/ide/ide-tape.c | 12 ++++++------
> 3 files changed, 17 insertions(+), 15 deletions(-)

[...]

> @@ -592,8 +593,7 @@ static void ide_tape_create_rw_cmd(idetape_tape_t *tape,
> put_unaligned(cpu_to_be32(length), (unsigned int *) &pc->c[1]);
> pc->c[1] = 1;
> pc->buf = NULL;
> - pc->buf_size = length * tape->blk_size;
> - pc->req_xfer = pc->buf_size;
> + pc->buf_size = blk_rq_bytes(rq);
> if (pc->req_xfer == tape->buffer_size)

Seems like this chunk also needs s/pc->req_xfer/pc->buf_size/ fixup.


\
 
 \ /
  Last update: 2009-05-10 23:39    [W:0.181 / U:0.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site