From: Dan Williams <dan.j.williams@intel.com>
To: Yuri Tikhonov <yur@emcraft.com>
Cc: linux-raid@vger.kernel.org, linuxppc-dev@ozlabs.org, wd@denx.de,
dzu@denx.de, yanok@emcraft.com
Subject: Re: [PATCH 07/11] md: rewrite handle_stripe_dirtying6 in asynchronous way
Date: Thu, 15 Jan 2009 14:51:39 -0700 [thread overview]
Message-ID: <e9c3a7c20901151351p5e1b4641h1b4c8ba1ae5dcc73@mail.gmail.com> (raw)
In-Reply-To: <200812090057.33890.yur@emcraft.com>
On Mon, Dec 8, 2008 at 2:57 PM, Yuri Tikhonov <yur@emcraft.com> wrote:
> Rewrite handle_stripe_dirtying6 function to work asynchronously.
>
> Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
> Signed-off-by: Ilya Yanok <yanok@emcraft.com>
> ---
> drivers/md/raid5.c | 113 ++++++++++++++--------------------------------------
> 1 files changed, 30 insertions(+), 83 deletions(-)
>
> diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
> index e08ed4f..f0b47bd 100644
> --- a/drivers/md/raid5.c
> +++ b/drivers/md/raid5.c
> @@ -2485,99 +2485,46 @@ static void handle_stripe_dirtying6(raid5_conf_t *conf,
> struct stripe_head *sh, struct stripe_head_state *s,
> struct r6_state *r6s, int disks)
> {
> - int rcw = 0, must_compute = 0, pd_idx = sh->pd_idx, i;
> + int rcw = 0, pd_idx = sh->pd_idx, i;
> int qd_idx = r6s->qd_idx;
> +
> + set_bit(STRIPE_HANDLE, &sh->state);
> for (i = disks; i--; ) {
> struct r5dev *dev = &sh->dev[i];
> - /* Would I have to read this buffer for reconstruct_write */
> - if (!test_bit(R5_OVERWRITE, &dev->flags)
> - && i != pd_idx && i != qd_idx
> - && (!test_bit(R5_LOCKED, &dev->flags)
> - ) &&
> - !test_bit(R5_UPTODATE, &dev->flags)) {
> - if (test_bit(R5_Insync, &dev->flags)) rcw++;
> - else {
> - pr_debug("raid6: must_compute: "
> - "disk %d flags=%#lx\n", i, dev->flags);
> - must_compute++;
> + /* check if we haven't enough data */
> + if (!test_bit(R5_OVERWRITE, &dev->flags) &&
> + i != pd_idx && i != qd_idx &&
> + !test_bit(R5_LOCKED, &dev->flags) &&
> + !(test_bit(R5_UPTODATE, &dev->flags) ||
> + test_bit(R5_Wantcompute, &dev->flags))) {
> + rcw++;
> + if (!test_bit(R5_Insync, &dev->flags))
> + continue; /* it's a failed drive */
> +
> + if (
> + test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) {
> + pr_debug("Read_old stripe %llu "
> + "block %d for Reconstruct\n",
> + (unsigned long long)sh->sector, i);
> + set_bit(R5_LOCKED, &dev->flags);
> + set_bit(R5_Wantread, &dev->flags);
> + s->locked++;
> + } else {
> + pr_debug("Request delayed stripe %llu "
> + "block %d for Reconstruct\n",
> + (unsigned long long)sh->sector, i);
> + set_bit(STRIPE_DELAYED, &sh->state);
> + set_bit(STRIPE_HANDLE, &sh->state);
What's the reasoning behind changing the logic here, i.e. removing
must_compute and such? I'd feel more comfortable seeing copy and
paste where possible with cleanups separated out into their own patch.
--
Dan
next prev parent reply other threads:[~2009-01-15 21:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-08 21:57 [PATCH 07/11] md: rewrite handle_stripe_dirtying6 in asynchronous way Yuri Tikhonov
2009-01-15 21:51 ` Dan Williams [this message]
2009-01-15 22:21 ` Dan Williams
2009-01-16 1:07 ` Cheng Renquan
2009-01-16 14:46 ` Re[2]: " Yuri Tikhonov
2009-01-16 14:24 ` Yuri Tikhonov
2009-01-16 18:39 ` Dan Williams
-- strict thread matches above, loose matches on Subject: below --
2008-11-13 15:15 [RFC PATCH 00/11] md: support for asynchronous execution of RAID6 operations Ilya Yanok
2008-11-13 15:16 ` [PATCH 07/11] md: rewrite handle_stripe_dirtying6 in asynchronous way Ilya Yanok
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=e9c3a7c20901151351p5e1b4641h1b4c8ba1ae5dcc73@mail.gmail.com \
--to=dan.j.williams@intel.com \
--cc=dzu@denx.de \
--cc=linux-raid@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=wd@denx.de \
--cc=yanok@emcraft.com \
--cc=yur@emcraft.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;
as well as URLs for NNTP newsgroup(s).