]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Initialise all of file when opening backup file for reshape.
authorNeilBrown <neilb@suse.de>
Mon, 31 Jan 2011 05:57:40 +0000 (16:57 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 31 Jan 2011 05:57:40 +0000 (16:57 +1100)
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>
Grow.c

diff --git a/Grow.c b/Grow.c
index 2a1383188aa5a47216a90d7eaf9a321124cc6ee8..b81f09eb9dadc57394d163715805252e671d7846 100644 (file)
--- 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",