* [PATCH] imsm: block chunk size change for RAID 10
@ 2016-10-12 12:28 Mariusz Dabrowski
2016-10-19 15:23 ` Jes Sorensen
0 siblings, 1 reply; 2+ messages in thread
From: Mariusz Dabrowski @ 2016-10-12 12:28 UTC (permalink / raw)
To: linux-raid
Cc: Jes.Sorensen, tomasz.majchrzak, aleksey.obitotskiy,
pawel.baldysiak, artur.paszkiewicz, maksymilian.kunt,
Mariusz Dabrowski
Chunk size change of RAID 10 array fails because it is not supported but
invalid values still are being written to metadata and array cannot be
assembled after stop. Operation should be blocked before metadata update.
Signed-off-by: Mariusz Dabrowski <mariusz.dabrowski@intel.com>
---
super-intel.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index 92817e9..0b3b2b1 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -10074,10 +10074,16 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st,
}
if ((geo->chunksize > 0) && (geo->chunksize != UnSet)
- && (geo->chunksize != info.array.chunk_size))
+ && (geo->chunksize != info.array.chunk_size)) {
+ if (info.array.level == 10) {
+ pr_err("Error. Chunk size change for RAID 10 is not supported.\n");
+ change = -1;
+ goto analyse_change_exit;
+ }
change = CH_MIGRATION;
- else
+ } else {
geo->chunksize = info.array.chunk_size;
+ }
chunk = geo->chunksize / 1024;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] imsm: block chunk size change for RAID 10
2016-10-12 12:28 [PATCH] imsm: block chunk size change for RAID 10 Mariusz Dabrowski
@ 2016-10-19 15:23 ` Jes Sorensen
0 siblings, 0 replies; 2+ messages in thread
From: Jes Sorensen @ 2016-10-19 15:23 UTC (permalink / raw)
To: Mariusz Dabrowski
Cc: linux-raid, tomasz.majchrzak, aleksey.obitotskiy, pawel.baldysiak,
artur.paszkiewicz, maksymilian.kunt
Mariusz Dabrowski <mariusz.dabrowski@intel.com> writes:
> Chunk size change of RAID 10 array fails because it is not supported but
> invalid values still are being written to metadata and array cannot be
> assembled after stop. Operation should be blocked before metadata update.
>
> Signed-off-by: Mariusz Dabrowski <mariusz.dabrowski@intel.com>
> ---
> super-intel.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/super-intel.c b/super-intel.c
> index 92817e9..0b3b2b1 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -10074,10 +10074,16 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st,
> }
>
> if ((geo->chunksize > 0) && (geo->chunksize != UnSet)
> - && (geo->chunksize != info.array.chunk_size))
> + && (geo->chunksize != info.array.chunk_size)) {
> + if (info.array.level == 10) {
> + pr_err("Error. Chunk size change for RAID 10 is not supported.\n");
> + change = -1;
> + goto analyse_change_exit;
> + }
> change = CH_MIGRATION;
> - else
> + } else {
> geo->chunksize = info.array.chunk_size;
> + }
>
> chunk = geo->chunksize / 1024;
Applied, however I am going to go in and fix up the broken formatting of
that if statement as well.
Thanks,
Jes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-19 15:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-12 12:28 [PATCH] imsm: block chunk size change for RAID 10 Mariusz Dabrowski
2016-10-19 15:23 ` Jes Sorensen
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).