From: Adam Kwolek <adam.kwolek@intel.com>
To: neilb@suse.de
Cc: linux-raid@vger.kernel.org, dan.j.williams@intel.com,
ed.ciechanowski@intel.com
Subject: [PATCH 23/27] Migration: Chunk size migration
Date: Mon, 06 Dec 2010 14:23:46 +0100 [thread overview]
Message-ID: <20101206132346.21125.93222.stgit@gklab-170-024.igk.intel.com> (raw)
In-Reply-To: <20101206131821.21125.65217.stgit@gklab-170-024.igk.intel.com>
Add implementation for chunk size migration for external metadata.
Update works using array parameters update in managemon. Reshape is started by managemon also.
mdadm waits for reshape array state instead starting reshape process.
For imsm chunk size parameter flow, from mdadm (via metadata update) to managemon was added.
Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
---
managemon.c | 6 ++++++
mdmon.h | 1 +
super-intel.c | 4 ++++
3 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/managemon.c b/managemon.c
index 4874681..6ac7178 100644
--- a/managemon.c
+++ b/managemon.c
@@ -520,6 +520,12 @@ static void manage_member(struct mdstat_ent *mdstat,
}
}
+ if (status_ok && newa->reshape_chunk_size > 0) {
+ dprintf("managemon: set chunk_size to %i\n", newa->reshape_chunk_size);
+ if (sysfs_set_num(&newa->info, NULL, "chunk_size", newa->reshape_chunk_size) < 0)
+ status_ok = 0;
+ }
+
if (status_ok && newa->reshape_layout >= 0) {
dprintf("managemon: set layout to %i\n", newa->reshape_layout);
if (sysfs_set_num(&newa->info, NULL, "layout", newa->reshape_layout) < 0)
diff --git a/mdmon.h b/mdmon.h
index a31ad97..c83bd99 100644
--- a/mdmon.h
+++ b/mdmon.h
@@ -52,6 +52,7 @@ struct active_array {
int reshape_raid_disks;
int reshape_level;
int reshape_layout;
+ int reshape_chunk_size;
int check_degraded; /* flag set by mon, read by manage */
diff --git a/super-intel.c b/super-intel.c
index dee23e2..5779129 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -317,6 +317,7 @@ struct imsm_update_reshape {
int reshape_raid_disks;
int reshape_level;
int reshape_layout;
+ int reshape_chunk_size;
int disks_count;
int spares_in_update;
int devnum;
@@ -5445,6 +5446,7 @@ static void imsm_process_update(struct supertype *st,
a->reshape_level = 5;
a->reshape_layout = 5;
}
+ a->reshape_chunk_size = u->reshape_chunk_size;
super->updates_pending++;
update_reshape_exit:
@@ -6540,6 +6542,7 @@ struct imsm_update_reshape *imsm_create_metadata_update_for_reshape(struct super
u->reshape_raid_disks = 0;
u->reshape_level = -1;
u->reshape_layout = -1;
+ u->reshape_chunk_size = -1;
u->update_memory_size = update_memory_size;
u->type = update_reshape;
u->spares_in_update = 0;
@@ -6884,6 +6887,7 @@ int imsm_reshape_super(struct supertype *st, long long size, int level,
u->reshape_raid_disks = geo.raid_disks;
u->reshape_level = geo.level;
u->reshape_layout = geo.layout;
+ u->reshape_chunk_size = geo.chunksize;
ret_val = 0;
append_metadata_update(st, u, u->update_memory_size);
}
next prev parent reply other threads:[~2010-12-06 13:23 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-06 13:20 [PATCH 00/27] OLCE, migrations and raid10 takeover Adam Kwolek
2010-12-06 13:20 ` [PATCH 01/27] FIX: wait_backup() sometimes hangs Adam Kwolek
2010-12-06 13:21 ` [PATCH 02/27] Add state_of_reshape for external metadata Adam Kwolek
2010-12-06 13:21 ` [PATCH 03/27] imsm: Prepare reshape_update in mdadm Adam Kwolek
2010-12-08 3:10 ` Neil Brown
2010-12-08 14:18 ` Kwolek, Adam
2010-12-08 22:05 ` Neil Brown
2010-12-09 8:42 ` Suspend_hi mamagment during reshape Kwolek, Adam
2010-12-09 10:28 ` Neil Brown
2010-12-09 15:59 ` Kwolek, Adam
2010-12-09 16:08 ` Kwolek, Adam
2010-12-06 13:21 ` [PATCH 04/27] imsm: Process reshape_update in mdmon Adam Kwolek
2010-12-06 13:21 ` [PATCH 05/27] imsm: Block array state change during reshape Adam Kwolek
2010-12-06 13:21 ` [PATCH 06/27] Process reshape initialization by managemon Adam Kwolek
2010-12-06 13:21 ` [PATCH 07/27] imsm: Verify slots in meta against slot numbers set by md Adam Kwolek
2010-12-06 13:21 ` [PATCH 08/27] imsm: Cancel metadata changes on reshape start failure Adam Kwolek
2010-12-06 13:21 ` [PATCH 09/27] imsm: Do not accept messages sent by mdadm Adam Kwolek
2010-12-06 13:22 ` [PATCH 10/27] imsm: Do not indicate resync during reshape Adam Kwolek
2010-12-06 13:22 ` [PATCH 11/27] imsm: Fill delta_disks field in getinfo_super() Adam Kwolek
2010-12-06 13:22 ` [PATCH 12/27] Control reshape in mdadm Adam Kwolek
2010-12-06 13:22 ` [PATCH 13/27] Finalize reshape after adding disks to array Adam Kwolek
2010-12-06 13:22 ` [PATCH 14/27] Add reshape progress updating Adam Kwolek
2010-12-06 13:22 ` [PATCH 15/27] WORKAROUND: md reports idle state during reshape start Adam Kwolek
2010-12-06 13:22 ` [PATCH 16/27] FIX: core during getting map Adam Kwolek
2010-12-06 13:22 ` [PATCH 17/27] Enable reshape for subarrays Adam Kwolek
2010-12-06 13:23 ` [PATCH 18/27] Change manage_reshape() placement Adam Kwolek
2010-12-06 13:23 ` [PATCH 19/27] Migration: raid5->raid0 Adam Kwolek
2010-12-06 13:23 ` [PATCH 20/27] Detect level change Adam Kwolek
2010-12-06 13:23 ` [PATCH 21/27] Migration raid0->raid5 Adam Kwolek
2010-12-06 13:23 ` [PATCH 22/27] Read chunk size and layout from mdstat Adam Kwolek
2010-12-06 13:23 ` Adam Kwolek [this message]
2010-12-06 13:23 ` [PATCH 24/27] Add takeover support for external meta Adam Kwolek
2010-12-06 13:24 ` [PATCH 25/27] Takeover raid10 -> raid0 for external metadata Adam Kwolek
2010-12-06 13:24 ` [PATCH 26/27] Takeover raid0 -> raid10 " Adam Kwolek
2010-12-06 13:24 ` [PATCH 27/27] FIX: Problem with removing array after takeover Adam Kwolek
2010-12-07 10:18 ` [PATCH 00/27] OLCE, migrations and raid10 takeover Neil Brown
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=20101206132346.21125.93222.stgit@gklab-170-024.igk.intel.com \
--to=adam.kwolek@intel.com \
--cc=dan.j.williams@intel.com \
--cc=ed.ciechanowski@intel.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/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).