* [PATCH] imsm: fix, the second array need to have the whole available space on devices
@ 2012-01-27 15:28 Labun, Marcin
2012-01-30 1:21 ` NeilBrown
0 siblings, 1 reply; 2+ messages in thread
From: Labun, Marcin @ 2012-01-27 15:28 UTC (permalink / raw)
To: neilb@suse.de; +Cc: linux-raid@vger.kernel.org, Kwolek, Adam
Fix the case with creating an array with given container in command line
instead of real devices:
mdadm -CR /dev/md/raid0 -l 0 -n 2 -z5G /dev/md/imsm
Signed-off-by: Marcin Labun <marcin.labun@intel.com>
---
super-intel.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index 0e9269f..03e10bd 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -5525,8 +5525,15 @@ static int reserve_space(struct supertype *st, int raiddisks,
size /= 2 * chunk;
size *= 2 * chunk;
}
+ maxsize = size;
+ }
+ if (!check_env("IMSM_NO_PLATFORM") &&
+ mpb->num_raid_devs > 0 && size && size != maxsize) {
+ fprintf(stderr, Name ": attempting to create a second "
+ "volume with size less then remaining space. "
+ "Aborting...\n");
+ return 0;
}
-
cnt = 0;
for (dl = super->disks; dl; dl = dl->next)
if (dl->e)
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] imsm: fix, the second array need to have the whole available space on devices
2012-01-27 15:28 [PATCH] imsm: fix, the second array need to have the whole available space on devices Labun, Marcin
@ 2012-01-30 1:21 ` NeilBrown
0 siblings, 0 replies; 2+ messages in thread
From: NeilBrown @ 2012-01-30 1:21 UTC (permalink / raw)
To: Labun, Marcin; +Cc: linux-raid@vger.kernel.org, Kwolek, Adam
[-- Attachment #1: Type: text/plain, Size: 1179 bytes --]
On Fri, 27 Jan 2012 15:28:36 +0000 "Labun, Marcin" <Marcin.Labun@intel.com>
wrote:
> Fix the case with creating an array with given container in command line
> instead of real devices:
> mdadm -CR /dev/md/raid0 -l 0 -n 2 -z5G /dev/md/imsm
>
> Signed-off-by: Marcin Labun <marcin.labun@intel.com>
> ---
> super-intel.c | 9 ++++++++-
> 1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/super-intel.c b/super-intel.c
> index 0e9269f..03e10bd 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -5525,8 +5525,15 @@ static int reserve_space(struct supertype *st, int raiddisks,
> size /= 2 * chunk;
> size *= 2 * chunk;
> }
> + maxsize = size;
> + }
> + if (!check_env("IMSM_NO_PLATFORM") &&
> + mpb->num_raid_devs > 0 && size && size != maxsize) {
> + fprintf(stderr, Name ": attempting to create a second "
> + "volume with size less then remaining space. "
> + "Aborting...\n");
> + return 0;
> }
> -
> cnt = 0;
> for (dl = super->disks; dl; dl = dl->next)
> if (dl->e)
It is a shame that we need the same test in two different places...
I've applied this patch,
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-30 1:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-27 15:28 [PATCH] imsm: fix, the second array need to have the whole available space on devices Labun, Marcin
2012-01-30 1:21 ` NeilBrown
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).