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 <neilb@suse.de>
This commit is contained in:
NeilBrown 2011-01-31 16:57:40 +11:00
parent 1e971e7163
commit ca4fe0bfd3
1 changed files with 1 additions and 1 deletions

2
Grow.c
View File

@ -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",