* [PATCH]:drivers/md/raid10.c: r10buf_pool_alloc(): Set bi_vcnt for the new bio.
@ 2011-07-13 0:50 Muthu Kumar
2011-07-14 3:42 ` NeilBrown
0 siblings, 1 reply; 3+ messages in thread
From: Muthu Kumar @ 2011-07-13 0:50 UTC (permalink / raw)
To: neilb, linux-kernel
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;
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH]:drivers/md/raid10.c: r10buf_pool_alloc(): Set bi_vcnt for the new bio.
2011-07-13 0:50 [PATCH]:drivers/md/raid10.c: r10buf_pool_alloc(): Set bi_vcnt for the new bio Muthu Kumar
@ 2011-07-14 3:42 ` NeilBrown
2011-07-14 4:40 ` Muthu Kumar
0 siblings, 1 reply; 3+ messages in thread
From: NeilBrown @ 2011-07-14 3:42 UTC (permalink / raw)
To: Muthu Kumar; +Cc: linux-kernel
On Tue, 12 Jul 2011 17:50:32 -0700 Muthu Kumar <muthu.lkml@gmail.com> wrote:
> 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.
What would be the point of doing that? When an r10buf allocated in
sync_request(), one of the first things done to it is to initialise it
including setting bi_vcnt to 0.
>
> BTW, why are we not using bio_add_page() here to add the page to bio?
How would that be useful? We don't know what the underlying device is at
this point, and the point of bio_add_page is to make sure the device can
handle the extra page.
We do call bio_add_page at the appropriate time in sync_request().
So - not applied.
Thanks,
NeilBrown
>
> 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;
> --
> 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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH]:drivers/md/raid10.c: r10buf_pool_alloc(): Set bi_vcnt for the new bio.
2011-07-14 3:42 ` NeilBrown
@ 2011-07-14 4:40 ` Muthu Kumar
0 siblings, 0 replies; 3+ messages in thread
From: Muthu Kumar @ 2011-07-14 4:40 UTC (permalink / raw)
To: NeilBrown; +Cc: linux-kernel
Hi Neil,
>>
>> BTW, why are we not using bio_add_page() here to add the page to bio?
>
> How would that be useful? We don't know what the underlying device is at
> this point, and the point of bio_add_page is to make sure the device can
> handle the extra page.
>
> We do call bio_add_page at the appropriate time in sync_request().
Yes. Thanks for the explanation.
Regards,
Muthu
>
> So - not applied.
>
> Thanks,
> NeilBrown
>
>
>>
>> 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;
>> --
>> 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/
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-07-14 4:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-13 0:50 [PATCH]:drivers/md/raid10.c: r10buf_pool_alloc(): Set bi_vcnt for the new bio Muthu Kumar
2011-07-14 3:42 ` NeilBrown
2011-07-14 4:40 ` Muthu Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®