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 6/9] imsm: FIX: container content gathering is not needed for size set
Date: Wed, 12 Jan 2011 16:52:39 +1100 [thread overview]
Message-ID: <20110112165239.720cb9e4@notabene.brown> (raw)
In-Reply-To: <20110111140435.13862.5816.stgit@gklab-128-013.igk.intel.com>
On Tue, 11 Jan 2011 15:04:35 +0100 Adam Kwolek <adam.kwolek@intel.com> wrote:
> Size information is loaded already and there is no need to load it again,
> when metadata is not reloaded.
Why do you say that? It seems wrong.
When growing an array, the size will not change until the reshape completes.
When it does complete, it will be mdmon which updates the metadata and
records in it the desired size of the array.
The only way mdadm can find this number out is by loading the metadata.
Where am I wrong?
NeilBrown
>
> Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
> ---
>
> Grow.c | 58 +++++++++++++++++++++++++---------------------------------
> 1 files changed, 25 insertions(+), 33 deletions(-)
>
> diff --git a/Grow.c b/Grow.c
> index 2ca9835..6238eb3 100644
> --- a/Grow.c
> +++ b/Grow.c
> @@ -2019,44 +2019,36 @@ static int reshape_array(char *container, int fd, char *devname,
> if (reshape.before.data_disks !=
> reshape.after.data_disks &&
> info->custom_array_size) {
> - struct mdinfo *info2;
> - char *subarray = strchr(info->text_version+1, '/')+1;
> + unsigned long long current_size = 0;
> + unsigned long long new_size = info->custom_array_size/2;
> + unsigned long long suspend_value;
>
> wait_reshape(sra);
> ping_monitor(container);
>
> - info2 = st->ss->container_content(st, subarray);
> - if (info2) {
> - unsigned long long current_size = 0;
> - unsigned long long new_size =
> - info2->custom_array_size/2;
> - unsigned long long suspend_value;
> -
> - if (sysfs_get_ll(sra,
> - NULL,
> - "array_size",
> - ¤t_size) == 0 &&
> - new_size > current_size) {
> - if (sysfs_set_num(sra, NULL,
> - "array_size", new_size)
> - < 0)
> - dprintf("Error: Cannot"
> - " set array size");
> - else
> - dprintf("Array size "
> - "changed");
> - dprintf(" from %llu to %llu.\n",
> - current_size, new_size);
> - }
> - /* manage suspend_* entries
> - * set suspend_lo to suspend_hi value
> - * to unblock array
> - */
> - sysfs_get_ll(sra, NULL, "suspend_hi", &suspend_value);
> - sysfs_set_num(sra, NULL, "suspend_lo", suspend_value);
> -
> - sysfs_free(info2);
> +
> + if (sysfs_get_ll(sra,
> + NULL,
> + "array_size",
> + ¤t_size) == 0 &&
> + new_size > current_size) {
> + if (sysfs_set_num(sra, NULL,
> + "array_size", new_size)
> + < 0)
> + dprintf("Error: Cannot"
> + " set array size");
> + else
> + dprintf("Array size "
> + "changed");
> + dprintf(" from %llu to %llu.\n",
> + current_size, new_size);
> }
> + /* manage suspend_* entries
> + * set suspend_lo to suspend_hi value
> + * to unblock array
> + */
> + sysfs_get_ll(sra, NULL, "suspend_hi", &suspend_value);
> + sysfs_set_num(sra, NULL, "suspend_lo", suspend_value);
> }
>
> if (info->new_level != reshape.level) {
next prev parent reply other threads:[~2011-01-12 5:52 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-11 14:03 [PATCH 0/9] OLCE for external meta (cont.) Adam Kwolek
2011-01-11 14:03 ` [PATCH 1/9] imsm: FIX: set correct slot information in metadata (raid0) Adam Kwolek
2011-01-11 14:04 ` [PATCH 2/9] FIX: Cannot add spare to monitored container Adam Kwolek
2011-01-12 5:43 ` NeilBrown
2011-01-12 15:57 ` Kwolek, Adam
2011-01-13 3:07 ` NeilBrown
2011-01-13 15:15 ` Czarnowska, Anna
2011-01-11 14:04 ` [PATCH 3/9] imsm:FIX: one spare can be added to raid0 only Adam Kwolek
2011-01-12 5:44 ` NeilBrown
2011-01-12 15:15 ` Kwolek, Adam
2011-01-11 14:04 ` [PATCH 4/9] imsm: FIX: only one spare is passed in update Adam Kwolek
2011-01-12 5:46 ` NeilBrown
2011-01-11 14:04 ` [PATCH 5/9] imsm: Update metadata for second array Adam Kwolek
2011-01-12 5:48 ` NeilBrown
2011-01-11 14:04 ` [PATCH 6/9] imsm: FIX: container content gathering is not needed for size set Adam Kwolek
2011-01-12 5:52 ` NeilBrown [this message]
2011-01-12 15:30 ` Kwolek, Adam
2011-01-13 3:04 ` NeilBrown
2011-01-11 14:04 ` [PATCH 7/9] imsm: FIX: monitor should initialize 2nd reshape only Adam Kwolek
2011-01-12 5:57 ` NeilBrown
2011-01-11 14:04 ` [PATCH 8/9] FIX: container has to be frozen during reshape Adam Kwolek
2011-01-11 14:04 ` [PATCH 9/9] imsm: Proceed with second array reshape only for frozen container Adam Kwolek
2011-01-11 15:23 ` [PATCH 0/4] RAID 0 to/from RAID5 migration Labun, Marcin
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=20110112165239.720cb9e4@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).