Re: [PATCH 02/14] ide-atapi: switch to blk_rq_bytes() on do_request() path

From: Bartlomiej Zolnierkiewicz
Date: Sun May 10 2009 - 17:36:27 EST


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@xxxxxxxxx>
> ---
> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/