]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Grow.c
Grow: Use 'forked' also for reshape_container in Grow_continue
[thirdparty/mdadm.git] / Grow.c
diff --git a/Grow.c b/Grow.c
index 202b6ef4d1078df7ab9da0b38650073420770ef4..2de821d0b9d432b8b6945ed417f91d1f6e188a0a 100644 (file)
--- a/Grow.c
+++ b/Grow.c
@@ -24,6 +24,7 @@
 #include       "mdadm.h"
 #include       "dlink.h"
 #include       <sys/mman.h>
+#include       <stddef.h>
 #include       <stdint.h>
 #include       <signal.h>
 #include       <sys/wait.h>
 #include       "md_u.h"
 #include       "md_p.h"
 
-#ifndef offsetof
-#define offsetof(t,f) ((size_t)&(((t*)0)->f))
-#endif
-
 int restore_backup(struct supertype *st,
                   struct mdinfo *content,
                   int working_disks,
@@ -1325,7 +1322,6 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re)
 
                switch (re->level) {
                case 4:
-                       re->before.layout = 0;
                        re->after.layout = 0;
                        break;
                case 5:
@@ -4953,7 +4949,7 @@ int Grow_continue(int mdfd, struct supertype *st, struct mdinfo *info,
                close(cfd);
                ret_val = reshape_container(st->container_devnm, NULL, mdfd,
                                            st, info, 0, backup_file,
-                                           0, 1,
+                                           0, forked,
                                            1 | info->reshape_active,
                                            freeze_reshape);
        } else