From: NeilBrown <neilb@suse.de>
To: Adam Kwolek <adam.kwolek@intel.com>
Cc: linux-raid@vger.kernel.org, ed.ciechanowski@intel.com,
marcin.labun@intel.com, dan.j.williams@intel.com
Subject: Re: [PATCH 3/3] Set correct reshape restart position
Date: Wed, 5 Oct 2011 14:17:19 +1100 [thread overview]
Message-ID: <20111005141719.4dcde7f6@notabene.brown> (raw)
In-Reply-To: <20111004155404.27434.89339.stgit@gklab-128-013.igk.intel.com>
[-- Attachment #1: Type: text/plain, Size: 2377 bytes --]
On Tue, 04 Oct 2011 17:54:04 +0200 Adam Kwolek <adam.kwolek@intel.com> wrote:
> This patch version is simplified compared to previous one.
> There is no use of freeze_reshape flag in start_reshape(). It is assumed
> that for reshape starting condition reshape_progress field contains
> 0 value /correct start position/. For reshape restart case, it contains
> correct restart position. This approach doesn't make start_reshape()
> difficult to read/manage and /imho/ kernel changes to change mdstat
> reporting behavior are not necessary.
>
> Setting correct position allows user to see it in the mdstat during
> reshape restart and reshape process is not reported as resync.
Applied, thanks.
NeilBrown
>
> Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
> ---
>
> Grow.c | 17 +++++++++++------
> 1 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/Grow.c b/Grow.c
> index 076375a..44505b3 100644
> --- a/Grow.c
> +++ b/Grow.c
> @@ -696,15 +696,19 @@ static int subarray_set_num(char *container, struct mdinfo *sra, char *name, int
> return rc;
> }
>
> -int start_reshape(struct mdinfo *sra, int already_running)
> +int start_reshape(struct mdinfo *sra, int already_running, int data_disks)
> {
> int err;
> + unsigned long long sync_max_to_set;
> +
> sysfs_set_num(sra, NULL, "suspend_lo", 0x7FFFFFFFFFFFFFFFULL);
> - err = sysfs_set_num(sra, NULL, "suspend_hi", 0);
> - err = err ?: sysfs_set_num(sra, NULL, "suspend_lo", 0);
> + err = sysfs_set_num(sra, NULL, "suspend_hi", sra->reshape_progress);
> + err = err ?: sysfs_set_num(sra, NULL, "suspend_lo",
> + sra->reshape_progress);
> + sync_max_to_set = sra->reshape_progress / data_disks;
> if (!already_running)
> - sysfs_set_num(sra, NULL, "sync_min", 0);
> - err = err ?: sysfs_set_num(sra, NULL, "sync_max", 0);
> + sysfs_set_num(sra, NULL, "sync_min", sync_max_to_set);
> + err = err ?: sysfs_set_num(sra, NULL, "sync_max", sync_max_to_set);
> if (!already_running)
> err = err ?: sysfs_set_str(sra, NULL, "sync_action", "reshape");
>
> @@ -2241,7 +2245,8 @@ started:
> }
> }
>
> - err = start_reshape(sra, restart);
> + err = start_reshape(sra, restart,
> + info->array.raid_disks - reshape.parity);
> if (err) {
> fprintf(stderr,
> Name ": Cannot %s reshape for %s\n",
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
prev parent reply other threads:[~2011-10-05 3:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-04 15:53 [PATCH 0/3] Reshape restart after file system pivot (missing part) Adam Kwolek
2011-10-04 15:53 ` [PATCH 1/3] Always run Grow_continue() for started array Adam Kwolek
2011-10-05 2:59 ` NeilBrown
2011-10-05 7:04 ` Kwolek, Adam
2011-10-06 4:00 ` NeilBrown
2011-10-04 15:53 ` [PATCH 2/3] Monitor reshaped array Adam Kwolek
2011-10-05 2:59 ` NeilBrown
2011-10-04 15:54 ` [PATCH 3/3] Set correct reshape restart position Adam Kwolek
2011-10-05 3:17 ` NeilBrown [this message]
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=20111005141719.4dcde7f6@notabene.brown \
--to=neilb@suse.de \
--cc=adam.kwolek@intel.com \
--cc=dan.j.williams@intel.com \
--cc=ed.ciechanowski@intel.com \
--cc=linux-raid@vger.kernel.org \
--cc=marcin.labun@intel.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).