diff options
author | NeilBrown <neilb@suse.de> | 2009-08-13 03:12:54 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-08-13 03:12:54 +0200 |
commit | e9e43ec36756c50a5dabf6db52d9bebbccaaa72f (patch) | |
tree | ac201cf8558875cbb1d5091f985a6bb3053b4cf7 /restripe.c | |
parent | Handle extra 'grow' variations. (diff) | |
download | mdadm-e9e43ec36756c50a5dabf6db52d9bebbccaaa72f.tar.xz mdadm-e9e43ec36756c50a5dabf6db52d9bebbccaaa72f.zip |
Grow: support restart of new migrations.
Diffstat (limited to 'restripe.c')
-rw-r--r-- | restripe.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) |