* [PATCH RESEND] IMSM: Do not update metadata if not able to migrate
@ 2016-12-22 12:10 Pawel Baldysiak
2016-12-22 17:20 ` Jes Sorensen
0 siblings, 1 reply; 2+ messages in thread
From: Pawel Baldysiak @ 2016-12-22 12:10 UTC (permalink / raw)
To: jes.sorensen; +Cc: linux-raid, Pawel Baldysiak
This patch prevents mdadm from updating metadata if migration is
not possible. The same check is done in analyse_change(),
but in that place - metadata is already modified.
Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
---
super-intel.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/super-intel.c b/super-intel.c
index 0407d43..5e58672 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -10808,6 +10808,11 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st,
pr_err("Error. Chunk size change for RAID 10 is not supported.\n");
change = -1;
goto analyse_change_exit;
+ } else if (info.component_size % (geo->chunksize/512)) {
+ pr_err("New chunk size (%dK) does not evenly divide device size (%lluk). Aborting...\n",
+ geo->chunksize/1024, info.component_size/2);
+ change = -1;
+ goto analyse_change_exit;
}
change = CH_MIGRATION;
} else {
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH RESEND] IMSM: Do not update metadata if not able to migrate
2016-12-22 12:10 [PATCH RESEND] IMSM: Do not update metadata if not able to migrate Pawel Baldysiak
@ 2016-12-22 17:20 ` Jes Sorensen
0 siblings, 0 replies; 2+ messages in thread
From: Jes Sorensen @ 2016-12-22 17:20 UTC (permalink / raw)
To: Pawel Baldysiak; +Cc: linux-raid
Pawel Baldysiak <pawel.baldysiak@intel.com> writes:
> This patch prevents mdadm from updating metadata if migration is
> not possible. The same check is done in analyse_change(),
> but in that place - metadata is already modified.
>
> Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
> ---
> super-intel.c | 5 +++++
> 1 file changed, 5 insertions(+)
Applied!
Thanks,
Jes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-12-22 17:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-22 12:10 [PATCH RESEND] IMSM: Do not update metadata if not able to migrate Pawel Baldysiak
2016-12-22 17:20 ` Jes Sorensen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.