* [PATCH 2/4] imsm: Use single migration type for all migrations
2011-02-09 13:47 [PATCH 1/4] imsm: FIX: add raid5 to raid0 case to analyse_change() Adam Kwolek
@ 2011-02-09 13:47 ` Adam Kwolek
2011-02-09 13:47 ` [PATCH 3/4] FIX: array after migration should be unfrozen Adam Kwolek
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Adam Kwolek @ 2011-02-09 13:47 UTC (permalink / raw)
To: neilb; +Cc: linux-raid, dan.j.williams, ed.ciechanowski, wojciech.neubauer
Use single enum definition/migration type for all migrations.
Using separate definitions causes limitation for number of changes
in metadata implementation during single update for migration/reshape.
Single CH_MIGRATION enum allows for many mtadata parameters change
in single update. It will be possible to change i.e. chunk size together
with raid level. In current implementation 2 metadata updates would be
required for such action, one using CH_CHUNK_MIGR and second using
CH_LEVEL_MIGRATION migration type.
Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
---
super-intel.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index 2875ade..876cc4c 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -294,8 +294,7 @@ struct extent {
/* definitions of reshape process types */
enum imsm_reshape_type {
CH_TAKEOVER,
- CH_CHUNK_MIGR,
- CH_LEVEL_MIGRATION
+ CH_MIGRATION
};
/* definition of messages passed to imsm_process_update */
@@ -6919,7 +6918,7 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st,
switch (info.array.level) {
case 0:
if (geo->level == 5) {
- change = CH_LEVEL_MIGRATION;
+ change = CH_MIGRATION;
check_devs = 1;
}
if (geo->level == 10) {
@@ -6935,7 +6934,7 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st,
break;
case 5:
if (geo->level == 0)
- change = CH_LEVEL_MIGRATION;
+ change = CH_MIGRATION;
break;
case 10:
if (geo->level == 0) {
@@ -6956,7 +6955,7 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st,
if ((geo->layout != info.array.layout)
&& ((geo->layout != UnSet) && (geo->layout != -1))) {
- change = CH_LEVEL_MIGRATION;
+ change = CH_MIGRATION;
if ((info.array.layout == 0)
&& (info.array.level == 5)
&& (geo->layout == 5)) {
@@ -6980,7 +6979,7 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st,
if ((geo->chunksize > 0) && (geo->chunksize != UnSet)
&& (geo->chunksize != info.array.chunk_size))
- change = CH_CHUNK_MIGR;
+ change = CH_MIGRATION;
else
geo->chunksize = info.array.chunk_size;
@@ -7128,10 +7127,7 @@ static int imsm_reshape_super(struct supertype *st, long long size, int level,
case CH_TAKEOVER:
ret_val = imsm_takeover(st, &geo);
break;
- case CH_CHUNK_MIGR:
- ret_val = 0;
- break;
- case CH_LEVEL_MIGRATION:
+ case CH_MIGRATION:
ret_val = 0;
break;
default:
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] FIX: array after migration should be unfrozen
2011-02-09 13:47 [PATCH 1/4] imsm: FIX: add raid5 to raid0 case to analyse_change() Adam Kwolek
2011-02-09 13:47 ` [PATCH 2/4] imsm: Use single migration type for all migrations Adam Kwolek
@ 2011-02-09 13:47 ` Adam Kwolek
2011-02-09 13:48 ` [PATCH 4/4] imsm: Add information about failed disk to '-E' option Adam Kwolek
2011-02-13 22:26 ` [PATCH 1/4] imsm: FIX: add raid5 to raid0 case to analyse_change() NeilBrown
3 siblings, 0 replies; 5+ messages in thread
From: Adam Kwolek @ 2011-02-09 13:47 UTC (permalink / raw)
To: neilb; +Cc: linux-raid, dan.j.williams, ed.ciechanowski, wojciech.neubauer
After level migration array is left frozen.
When process is not externally forked reshape_array() should
unfreeze array before exit (this is not container operation).
Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
---
Grow.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Grow.c b/Grow.c
index e3d3cb8..402da5e 100644
--- a/Grow.c
+++ b/Grow.c
@@ -2095,6 +2095,7 @@ started:
out:
if (forked)
return 0;
+ unfreeze(st);
exit(0);
release:
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] imsm: Add information about failed disk to '-E' option
2011-02-09 13:47 [PATCH 1/4] imsm: FIX: add raid5 to raid0 case to analyse_change() Adam Kwolek
2011-02-09 13:47 ` [PATCH 2/4] imsm: Use single migration type for all migrations Adam Kwolek
2011-02-09 13:47 ` [PATCH 3/4] FIX: array after migration should be unfrozen Adam Kwolek
@ 2011-02-09 13:48 ` Adam Kwolek
2011-02-13 22:26 ` [PATCH 1/4] imsm: FIX: add raid5 to raid0 case to analyse_change() NeilBrown
3 siblings, 0 replies; 5+ messages in thread
From: Adam Kwolek @ 2011-02-09 13:48 UTC (permalink / raw)
To: neilb; +Cc: linux-raid, dan.j.williams, ed.ciechanowski, wojciech.neubauer
During metadata printout in '-E' option failed disk map field information is missing.
Add this information to mdadm '-E' option output.
Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
---
super-intel.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index 876cc4c..4a9c230 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -897,6 +897,12 @@ static void print_imsm_dev(struct imsm_dev *dev, char *uuid, int disk_idx)
printf("]");
}
printf("\n");
+ printf(" Failed disk : ");
+ if (map->failed_disk_num == 0xff)
+ printf("none");
+ else
+ printf("%i", map->failed_disk_num);
+ printf("\n");
slot = get_imsm_disk_slot(map, disk_idx);
if (slot >= 0) {
ord = get_imsm_ord_tbl_ent(dev, slot, -1);
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/4] imsm: FIX: add raid5 to raid0 case to analyse_change()
2011-02-09 13:47 [PATCH 1/4] imsm: FIX: add raid5 to raid0 case to analyse_change() Adam Kwolek
` (2 preceding siblings ...)
2011-02-09 13:48 ` [PATCH 4/4] imsm: Add information about failed disk to '-E' option Adam Kwolek
@ 2011-02-13 22:26 ` NeilBrown
3 siblings, 0 replies; 5+ messages in thread
From: NeilBrown @ 2011-02-13 22:26 UTC (permalink / raw)
To: Adam Kwolek
Cc: linux-raid, dan.j.williams, ed.ciechanowski, wojciech.neubauer
On Wed, 09 Feb 2011 14:47:37 +0100 Adam Kwolek <adam.kwolek@intel.com> wrote:
> Transition raid0 to raid5 is not possible
> due to wrong condition in imsm_analyze_change().
> Current condition blocks migration possibility instead allow for it.
>
> Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Thanks. All 4 in this series applied.
NeilBrown
> ---
>
> super-intel.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/super-intel.c b/super-intel.c
> index 6a21b26..2875ade 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -6934,7 +6934,7 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st,
> }
> break;
> case 5:
> - if (geo->level != 0)
> + if (geo->level == 0)
> change = CH_LEVEL_MIGRATION;
> break;
> case 10:
^ permalink raw reply [flat|nested] 5+ messages in thread