linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH]  Block layer bug handling partial bvec
@ 2003-07-27 11:48 Sean Estabrooks
  2003-07-27 12:47 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Sean Estabrooks @ 2003-07-27 11:48 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton, Jens Axboe

[-- Attachment #1: Type: text/plain, Size: 504 bytes --]

Previously I submitted a patch for "blk: request botched" on floppy
write.  While the patch did make the floppy work, Jens mentioned 
that an underlying error still existed.   This spurred me on to look a 
little deeper and finally i found the root cause.   

There is a bug in "ll_rw_blk.c" handling partial bvec submissions.
For whatever reason the floppy driver was triggering it more than
other users.  Note that with the attached patch, my previous 
floppy_ patch is no longer needed.

Cheers,
Sean

[-- Attachment #2: blk_partial_bvec.patch --]
[-- Type: application/octet-stream, Size: 503 bytes --]

--- 26test1bk/drivers/block/ll_rw_blk.c	Sun Jul 27 07:03:29 2003
+++ 26test1bk/drivers/block/ll_rw_blk.c	Sun Jul 27 07:03:59 2003
@@ -2307,8 +2307,8 @@
 			 * not a complete bvec done
 			 */
 			if (unlikely(nbytes > nr_bytes)) {
-				bio_iovec(bio)->bv_offset += nr_bytes;
-				bio_iovec(bio)->bv_len -= nr_bytes;
+				bio_iovec_idx(bio, idx)->bv_offset += nr_bytes;
+				bio_iovec_idx(bio, idx)->bv_len -= nr_bytes;
 				bio_nbytes += nr_bytes;
 				total_bytes += nr_bytes;
 				break;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH]  Block layer bug handling partial bvec
  2003-07-27 11:48 [PATCH] Block layer bug handling partial bvec Sean Estabrooks
@ 2003-07-27 12:47 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2003-07-27 12:47 UTC (permalink / raw)
  To: Sean Estabrooks; +Cc: linux-kernel, Andrew Morton

On Sun, Jul 27 2003, Sean Estabrooks wrote:
> Previously I submitted a patch for "blk: request botched" on floppy
> write.  While the patch did make the floppy work, Jens mentioned 
> that an underlying error still existed.   This spurred me on to look a 
> little deeper and finally i found the root cause.   
> 
> There is a bug in "ll_rw_blk.c" handling partial bvec submissions.
> For whatever reason the floppy driver was triggering it more than
> other users.  Note that with the attached patch, my previous 
> floppy_ patch is no longer needed.

Good catch! Applied.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-27 12:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-27 11:48 [PATCH] Block layer bug handling partial bvec Sean Estabrooks
2003-07-27 12:47 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).