linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 8/8] FIX: reload metadata for container operation
Date: Thu, 13 Jan 2011 13:44:10 +1100	[thread overview]
Message-ID: <20110113134410.0b4b21f9@notabene.brown> (raw)
In-Reply-To: <20110112135526.15045.99010.stgit@gklab-128-013.igk.intel.com>

On Wed, 12 Jan 2011 14:55:26 +0100 Adam Kwolek <adam.kwolek@intel.com> wrote:

> When reshape is started metadata tells mdadm that reshape is active via reshape_active variable.
> When reshape is finished mdmon updates metadata to end reshape in metadata for current array.
> We have reload metadata to get this flag updated and switch to next array (if exists)
> for container reshape case. This is indicated by forked flag. Function has to returned
> to caller with reloaded metadata information /up to date/.
> 
> Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
> ---
> 
>  Grow.c |   19 ++++++++++++++++++-
>  1 files changed, 18 insertions(+), 1 deletions(-)
> 
> diff --git a/Grow.c b/Grow.c
> index 519fbc2..3455115 100644
> --- a/Grow.c
> +++ b/Grow.c
> @@ -2021,8 +2021,25 @@ static int reshape_array(char *container, int fd, char *devname,
>  					"to %s\n", devname, c);
>  		}
>  	out:
> -		if (forked)
> +		if (forked) {
> +			if (!rv) {
> +				if (container)
> +					ping_monitor(container);
> +				if (st->ss->external) {
> +					/* Re-load the metadata as much
> +				 * could have changed
> +				 */
> +					int cfd = open_dev(st->container_dev);
> +					if (cfd >= 0) {
> +						st->ss->free_super(st);
> +						st->ss->load_container(st, cfd,
> +								     container);
> +						close(cfd);
> +					}
> +				}
> +			}
>  			return 0;
> +		}
>  		exit(0);
>  	case -1:
>  		fprintf(stderr, Name ": Cannot run child to monitor reshape: %s\n",
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Thanks.  Instead of applying this I have rearrange the tail end of
reshape_array substantially which will hopefully have the same effect - or
better.

Thanks,
NeilBrown


      reply	other threads:[~2011-01-13  2:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-12 13:54 [PATCH 0/8] OLCE Raid5/0 single array for external meta Adam Kwolek
2011-01-12 13:54 ` [PATCH 1/8] FIX: put update in to queue for local meta update Adam Kwolek
2011-01-12 13:54 ` [PATCH 2/8] imsm: FIX: mdadm should process local data Adam Kwolek
2011-01-13  2:41   ` NeilBrown
2011-01-12 13:54 ` [PATCH 3/8] imsm: FIX: local mdadm update shouldn't be done in update creation function Adam Kwolek
2011-01-13  2:41   ` NeilBrown
2011-01-12 13:54 ` [PATCH 4/8] imsm: FIX: old devices memory has to be released Adam Kwolek
2011-01-13  2:41   ` NeilBrown
2011-01-12 13:55 ` [PATCH 5/8] FIX: Cannot load container information Adam Kwolek
2011-01-13  2:42   ` NeilBrown
2011-01-12 13:55 ` [PATCH 6/8] imsm: FIX: spares are not counted Adam Kwolek
2011-01-13  2:42   ` NeilBrown
2011-01-12 13:55 ` [PATCH 7/8] Finalize reshape after adding disks to array Adam Kwolek
2011-01-13  2:43   ` NeilBrown
2011-01-13  9:25     ` Kwolek, Adam
2011-01-12 13:55 ` [PATCH 8/8] FIX: reload metadata for container operation Adam Kwolek
2011-01-13  2:44   ` 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=20110113134410.0b4b21f9@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).