From: NeilBrown <neilb@suse.de>
To: Adam Kwolek <adam.kwolek@intel.com>
Cc: linux-raid@vger.kernel.org, dan.j.williams@intel.com,
ed.ciechanowski@intel.com, wojciech.neubauer@intel.com
Subject: Re: [PATCH 2/7] FIX: reshape in md should wait for monitoring process (external metadata)
Date: Wed, 2 Mar 2011 12:06:03 +1100 [thread overview]
Message-ID: <20110302120603.591725ca@notabene.brown> (raw)
In-Reply-To: <20110301145658.10678.6778.stgit@gklab-128-013.igk.intel.com>
On Tue, 01 Mar 2011 15:56:58 +0100 Adam Kwolek <adam.kwolek@intel.com> wrote:
> When container content is assembled it is possible that reshape
> is in progress. To avoid md to run reshape without monitoring.
> Before setting array parameters sync_max is set to 0, to not allow md
> for any move forward. After array parameters are set, sync_max is set to current
> reshape_progress. This is current reshape start point.
> Note that md is still blocked, and reshape is not continued.
>
> Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
> ---
>
> Assemble.c | 17 ++++++++++++++++-
> 1 files changed, 16 insertions(+), 1 deletions(-)
>
> diff --git a/Assemble.c b/Assemble.c
> index 4d41081..6aff049 100644
> --- a/Assemble.c
> +++ b/Assemble.c
> @@ -1510,11 +1510,26 @@ int assemble_container_content(struct supertype *st, int mdfd,
> sysfs_init(content, mdfd, 0);
>
> sra = sysfs_read(mdfd, 0, GET_VERSION);
> - if (sra == NULL || strcmp(sra->text_version, content->text_version) != 0)
> + if (sra == NULL || strcmp(sra->text_version,
> + content->text_version) != 0) {
> + if (content->reshape_active) {
> + /* block reshape until reshape monitoring
> + * allows for run
> + */
> + sysfs_set_num(content, NULL, "sync_max", 0);
> + }
> if (sysfs_set_array(content, md_get_version(mdfd)) != 0) {
> close(mdfd);
> return 1;
> }
> + if (content->reshape_active) {
> + /* set the current checkpoint to allow monitoring to
> + * restart reshape
> + */
> + sysfs_set_num(content, NULL, "sync_max",
> + content->reshape_progress);
> + }
> + }
> if (sra)
> sysfs_free(sra);
>
I fairly sure this is completely ineffective.
At this point the array has not been started, so 'sync_max' does not exist.
It doesn't appear until the array is activated.
We avoid restart starting early by assembling the array 'readonly' as reshape
cannot progress on a read-only array.
NeilBrown
next prev parent reply other threads:[~2011-03-02 1:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-01 14:56 [PATCH 0/7] Grow_continue, use in assembly (cont.) Adam Kwolek
2011-03-01 14:56 ` [PATCH 1/7] FIX: Verify Backup file name before reshape Adam Kwolek
2011-03-02 1:01 ` NeilBrown
2011-03-02 7:39 ` Kwolek, Adam
2011-03-01 14:56 ` [PATCH 2/7] FIX: reshape in md should wait for monitoring process (external metadata) Adam Kwolek
2011-03-02 1:06 ` NeilBrown [this message]
2011-03-01 14:57 ` [PATCH 3/7] FIX: configure disks slot for expansion Adam Kwolek
2011-03-02 1:10 ` NeilBrown
2011-03-02 7:48 ` Kwolek, Adam
2011-03-01 14:57 ` [PATCH 4/7] Add block_subarray() Adam Kwolek
2011-03-01 14:57 ` [PATCH 5/7] FIX: Block monitor when starting array with reshape in progress Adam Kwolek
2011-03-01 14:57 ` [PATCH 6/7] Continue reshape after assembling array Adam Kwolek
2011-03-01 14:57 ` [PATCH 7/7] FIX: array is frozen after reshape Adam Kwolek
2011-03-02 1:30 ` [PATCH 0/7] Grow_continue, use in assembly (cont.) NeilBrown
2011-03-02 7:49 ` Kwolek, Adam
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=20110302120603.591725ca@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=wojciech.neubauer@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).