]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Merge branch 'master' of git://github.com/djbw/mdadm
authorNeilBrown <neilb@suse.de>
Tue, 6 Jul 2010 04:46:47 +0000 (14:46 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 6 Jul 2010 04:46:47 +0000 (14:46 +1000)
1  2 
Create.c
Incremental.c
Manage.c
ReadMe.c
mdadm.8.in
mdadm.c
mdadm.h

diff --cc Create.c
Simple merge
diff --cc Incremental.c
index 4f107696b95f8e09d07ee4402fa5930494653797,8062e2b17e154aab8c8224d8c81c4dfc7ecc2ebb..96bfcec7fc586f38a1cec96c746cb188981b0bc7
@@@ -368,23 -368,9 +368,25 @@@ int Incremental(char *devname, int verb
                else
                        strcpy(chosen_name, devnum2devname(mp->devnum));
  
 +              /* It is generally not OK to add drives to a running array
 +               * as they are probably missing because they failed.
 +               * However if runstop is 1, then the array was possibly
 +               * started early and our best be is to add this anyway.
 +               * It would probably be good to allow explicit policy
 +               * statement about this.
 +               */
 +              if (runstop < 1) {
 +                      if (ioctl(mdfd, GET_ARRAY_INFO, &ainf) == 0) {
 +                              fprintf(stderr, Name
 +                                      ": not adding %s to active array (without --run) %s\n",
 +                                      devname, chosen_name);
 +                              close(mdfd);
 +                              return 2;
 +                      }
 +              }
                sra = sysfs_read(mdfd, fd2devnum(mdfd), (GET_DEVS | GET_STATE));
+               if (!sra)
+                       return 2;
  
                if (sra->devs) {
                        sprintf(dn, "%d:%d", sra->devs->disk.major,
diff --cc Manage.c
Simple merge
diff --cc ReadMe.c
Simple merge
diff --cc mdadm.8.in
Simple merge
diff --cc mdadm.c
Simple merge
diff --cc mdadm.h
Simple merge