From: NeilBrown Date: Mon, 31 Jan 2011 05:57:40 +0000 (+1100) Subject: Initialise all of file when opening backup file for reshape. X-Git-Tag: mdadm-3.2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca4fe0bfd3a070be087eb61da395c1d156cc95ac;p=thirdparty%2Fmdadm.git Initialise all of file when opening backup file for reshape. Due to a miscalculation we didn't initialise the whole file. There is 4K (8 sectors) for the metadata, then the data. Signed-off-by: NeilBrown --- diff --git a/Grow.c b/Grow.c index 2a138318..b81f09eb 100644 --- a/Grow.c +++ b/Grow.c @@ -832,7 +832,7 @@ int reshape_open_backup_file(char *backup_file, } memset(buf, 0, 512); - for (i=0; i < blocks + 1 ; i++) { + for (i=0; i < blocks + 8 ; i++) { if (write(*fdlist, buf, 512) != 512) { fprintf(stderr, Name ": %s: cannot create" " backup file %s: %s\n",