mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Muthu Kumar <muthu.lkml@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH]:drivers/md/raid10.c: r10buf_pool_alloc(): Set bi_vcnt for the new bio.
Date: Thu, 14 Jul 2011 13:42:28 +1000	[thread overview]
Message-ID: <20110714134228.65fb79c5@notabene.brown> (raw)
In-Reply-To: <CAFR8uecaG68Oifuz1ucpM49vaw5m420Cn0et-JQZjBjhsOes-Q@mail.gmail.com>

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/


  reply	other threads:[~2011-07-14  3:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-13  0:50 Muthu Kumar
2011-07-14  3:42 ` NeilBrown [this message]
2011-07-14  4:40   ` Muthu Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110714134228.65fb79c5@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=muthu.lkml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®