Thread (29 messages) 29 messages, 4 authors, 2004-01-06

Re: Possibly wrong BIO usage in ide_multwrite

From: Bartlomiej Zolnierkiewicz <hidden>
Date: 2004-01-06 00:01:03
Also in: lkml

Possibly related (same subject, not in this thread)

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.
quoted
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.
quoted hunk ↗ jump to hunk
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help