Re: Possibly wrong BIO usage in ide_multwrite

From: Bartlomiej Zolnierkiewicz
Date: Mon Jan 05 2004 - 19:04:23 EST


On Monday 05 of January 2004 23:51, Christophe Saout wrote:
> Remember? Can bio be NULL somewhere? Or what do you mean? It's our
> scratchpad and ide_multwrite never puts a NULL bio on it.

After last sector of the whole transfer is processed ide_multwrite() will set
it to NULL. Next IRQ is only ACK of previous datablock, no transfer happens.

> > Otherwise I patch is OK for me.
>
> Ok, take two.
>
> I also did legacy/pdc4030.c, it's more or less the same though I'm not
> able to test it.

Looks OK.

> @@ -333,14 +332,17 @@
> * we can end the original request.
> */
> if (!rq->nr_sectors) { /* all done? */
> + bio->bi_idx = bio->bi_vcnt - rq->nr_cbio_segments;
> rq = hwgroup->rq;
> ide_end_request(drive, 1, rq->nr_sectors);
> return ide_stopped;
> }
> }
> /* the original code did this here (?) */
> + bio->bi_idx = bio->bi_vcnt - rq->nr_cbio_segments;
> return ide_stopped;

Move it before the comment.

--bart

-
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/