summaryrefslogtreecommitdiff
path: root/restripe.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-08-13 11:12:54 +1000
committerNeilBrown <neilb@suse.de>2009-08-13 11:12:54 +1000
commite9e43ec36756c50a5dabf6db52d9bebbccaaa72f (patch)
treeac201cf8558875cbb1d5091f985a6bb3053b4cf7 /restripe.c
parent7236ee7ad4a15b0d800cfc1ccbcee78158a05ada (diff)
Grow: support restart of new migrations.
Diffstat (limited to 'restripe.c')
-rw-r--r--restripe.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/restripe.c b/restripe.c
index 38b44122..9a70cd09 100644
--- a/restripe.c
+++ b/restripe.c
@@ -519,13 +519,14 @@ int restore_stripes(int *dest, unsigned long long *offsets,
int source, unsigned long long read_offset,
unsigned long long start, unsigned long long length)
{
- char *stripe_buf = malloc(raid_disks * chunk_size);
+ char *stripe_buf;
char **stripes = malloc(raid_disks * sizeof(char*));
char **blocks = malloc(raid_disks * sizeof(char*));
int i;
int data_disks = raid_disks - (level == 0 ? 0 : level <= 5 ? 1 : 2);
+ posix_memalign((void**)&stripe_buf, 4096, raid_disks * chunk_size);
if (zero == NULL) {
zero = malloc(chunk_size);
if (zero)