linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Dan Williams" <dan.j.williams@intel.com>
To: neilb@suse.de
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH git-md-accel 1/2] raid5: refactor handle_stripe5 and handle_stripe6
Date: Mon, 18 Jun 2007 17:53:38 -0700	[thread overview]
Message-ID: <e9c3a7c20706181753x506af4daue8b3f530da3a0817@mail.gmail.com> (raw)
In-Reply-To: <20070618210724.19865.94357.stgit@dwillia2-linux.ch.intel.com>

On 6/18/07, Dan Williams <dan.j.williams@intel.com> wrote:
...
> +static void handle_stripe_expansion(raid5_conf_t *conf, struct stripe_head *sh,
> +                               struct r6_state *r6s)
> +{
> +       int i;
> +
> +       /* We have read all the blocks in this stripe and now we need to
> +        * copy some of them into a target stripe for expand.
> +        */
> +       clear_bit(STRIPE_EXPAND_SOURCE, &sh->state);
> +       for (i = 0; i < sh->disks; i++)
> +               if (i != sh->pd_idx && (r6s && i != r6s->qd_idx)) {
> +                       int dd_idx, pd_idx, j;
> +                       struct stripe_head *sh2;
> +
> +                       sector_t bn = compute_blocknr(sh, i);
> +                       sector_t s = raid5_compute_sector(bn, conf->raid_disks,
> +                                               conf->raid_disks-1, &dd_idx,
> +                                               &pd_idx, conf);
this bug made it through the regression test:

'conf->raid_disks-1' should be 'conf->raid_disks - conf->max_degraded'

--
Dan

  reply	other threads:[~2007-06-19  0:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-18 21:07 [PATCH git-md-accel 0/2] raid5 refactor, and pr_debug cleanup Dan Williams
2007-06-18 21:07 ` [PATCH git-md-accel 1/2] raid5: refactor handle_stripe5 and handle_stripe6 Dan Williams
2007-06-19  0:53   ` Dan Williams [this message]
2007-06-18 21:07 ` [PATCH git-md-accel 2/2] raid5: replace custom debug print with standard pr_debug Dan Williams

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=e9c3a7c20706181753x506af4daue8b3f530da3a0817@mail.gmail.com \
    --to=dan.j.williams@intel.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).