lkml.org 
[lkml]   [2011]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH]:drivers/md/raid10.c: r10buf_pool_alloc(): Set bi_vcnt for the new bio.
From
Hi Neil,
raid10.c: r10buf_pool_alloc() - doesn't set the bi_vcnt for the newly
allocated bio. Setting it to RESYNC_PAGES for successful case.

BTW, why are we not using bio_add_page() here to add the page to bio?

Signed-off-by: Muthukumar R <muthur@gmail.com>

------
drivers/md/raid10.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
------
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 6e84668..8504c5b 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -129,6 +129,7 @@ static void * r10buf_pool_alloc(gfp_t gfp_flags, void *data)

bio->bi_io_vec[i].bv_page = page;
}
+ bio->bi_vcnt = RESYNC_PAGES;
}

return r10_bio;

\
 
 \ /
  Last update: 2011-07-13 02:53    [W:0.047 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site