lkml.org 
[lkml]   [2003]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] loop.c patches, take two


Ben Slusky wrote:

>On Mon, 22 Dec 2003 01:00:39 +0200, Mika Penttil? wrote:
>
>
>>AFAICS, this code path is never taken. You don't queue block device writes
>>for the loop thread.
>>
>>
>
>Yes I do, in loop_end_io_transfer. If we allocated fewer pages for the copy
>bio than contained in the original bio, then those pages are recycled for
>the next write.
>
>@@ -413,7 +411,7 @@ static int loop_end_io_transfer(struct b
> if (bio->bi_size)
> return 1;
>
>- if (err || bio_rw(bio) == WRITE) {
>+ if (err || (bio_rw(bio) == WRITE && bio->bi_vcnt == rbh->bi_vcnt)) {
> bio_endio(rbh, rbh->bi_size, err);
> if (atomic_dec_and_test(&lo->lo_pending))
> up(&lo->lo_bh_mutex);
>
>
I see, subtle...

--Mika


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

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.099 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site