[lkml]   [2009]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH block#for-2.6.31 3/3] bio: always copy back data for copied kernel requests
When a read bio_copy_kern() request fails, the content of the bounce
buffer is not copied back. However, as request failure doesn't
necessarily mean complete failure, the buffer state can be useful.
This behavior is also inconsistent with the user map counterpart and
causes the subtle difference between bounced and unbounced IO causes

This patch makes bio_copy_kern_endio() ignore @err and always copy
back data on request completion.

Signed-off-by: Tejun Heo <>
Cc: Jens Axboe <>
Cc: Boaz Harrosh <>
Cc: James Bottomley <>
fs/bio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: block/fs/bio.c
--- block.orig/fs/bio.c
+++ block/fs/bio.c
@@ -1198,7 +1198,7 @@ static void bio_copy_kern_endio(struct b
char *addr = page_address(bvec->bv_page);
int len = bmd->iovecs[i].bv_len;

- if (read && !err)
+ if (read)
memcpy(p, addr, len);


 \ /
  Last update: 2009-05-15 17:23    [W:0.120 / U:4.400 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site