All of lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: kedacomkernel <kedacomkernel@gmail.com>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: [PATCH 1/5] md: When resync aborted,using ->curr_resync as the last completed request rather than ->curr_resync_completed.
Date: Mon, 29 Oct 2012 08:32:41 +1100	[thread overview]
Message-ID: <20121029083241.2a2dedcc@notabene.brown> (raw)
In-Reply-To: <2012102710283109761110@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1416 bytes --]

On Sat, 27 Oct 2012 10:28:58 +0800 kernelmail <kedacomkernel@gmail.com> wrote:

> In commit(db91ff55bdf06736b849afc1b1fce5763bbb8d5d),it said:
> >If a resync is aborted we should record how far we got
> >(recovery_cp) the last request that we know has completed
> >(->curr_resync_completed) rather than the last request that was
> >submitted (->curr_resync).
> But when resync aborted, it execed
> >wait_event(mddev->recovery_wait, !atomic_read(&mddev->recovery_active));
> After this, the ->curr_resync is the last completed request.
> 
> Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
> ---
>  drivers/md/md.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 9ab768a..1d9940d 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -7558,8 +7558,7 @@ void md_do_sync(struct md_thread *thread)
>  					printk(KERN_INFO
>  					       "md: checkpointing %s of %s.\n",
>  					       desc, mdname(mddev));
> -					mddev->recovery_cp =
> -						mddev->curr_resync_completed;
> +					mddev->recovery_cp = mddev->curr_resync;
>  				}
>  			} else
>  				mddev->recovery_cp = MaxSector;

No.
This reverts commit db91ff55bdf06736b849afc1b1fce5763bbb8d5d

Maybe if we differentiated between an abort-due-to-error and an
abort-due-to-request, then in the second card we could use ->curr_resync.

NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2012-10-28 21:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-27  2:28 [PATCH 1/5] md: When resync aborted,using ->curr_resync as the last completed request rather than ->curr_resync_completed kernelmail
2012-10-28 21:32 ` NeilBrown [this message]
2012-10-29  3:27   ` majianpeng
2012-11-19  1:37     ` NeilBrown

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=20121029083241.2a2dedcc@notabene.brown \
    --to=neilb@suse.de \
    --cc=kedacomkernel@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.