summaryrefslogtreecommitdiffstats
path: root/Build.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build.c')
-rw-r--r--Build.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Build.c b/Build.c
index 358f8e6..2d9f68f 100644
--- a/Build.c
+++ b/Build.c
@@ -36,7 +36,7 @@
int Build(char *mddev, int chunk, int level, int layout,
int raiddisks, mddev_dev_t devlist, int assume_clean,
char *bitmap_file, int bitmap_chunk, int write_behind,
- int delay, int verbose, int autof)
+ int delay, int verbose, int autof, unsigned long long size)
{
/* Build a linear or raid0 arrays without superblocks
* We cannot really do any checks, we just do it.
@@ -57,7 +57,6 @@ int Build(char *mddev, int chunk, int level, int layout,
int subdevs = 0, missing_disks = 0;
mddev_dev_t dv;
int bitmap_fd;
- unsigned long long size = ~0ULL;
unsigned long long bitmapsize;
int mdfd;
char chosen_name[1024];
@@ -135,7 +134,7 @@ int Build(char *mddev, int chunk, int level, int layout,
if (vers >= 9000) {
mdu_array_info_t array;
array.level = level;
- array.size = 0;
+ array.size = size;
array.nr_disks = raiddisks;
array.raid_disks = raiddisks;
array.md_minor = 0;
@@ -194,7 +193,7 @@ int Build(char *mddev, int chunk, int level, int layout,
(size == 0 || dsize < size))
size = dsize;
close(fd);
- if (vers>= 9000) {
+ if (vers >= 9000) {
mdu_disk_info_t disk;
disk.number = i;
disk.raid_disk = i;