]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - sysfs.c
Detail: clean up handing of the 'info' we load from superblock.
[thirdparty/mdadm.git] / sysfs.c
diff --git a/sysfs.c b/sysfs.c
index ebf9d8a65646d1e42ab28bac2c134c523eb58bc2..725c90c51751c1dedce98d3398d698183d9cdbab 100644 (file)
--- a/sysfs.c
+++ b/sysfs.c
@@ -273,22 +273,20 @@ struct mdinfo *sysfs_read(int fd, int devnum, unsigned long options)
 
                strcpy(dbase, "block/dev");
                if (load_sys(fname, buf)) {
+                       /* assume this is a stale reference to a hot
+                        * removed device
+                        */
                        free(dev);
-                       if (options & SKIP_GONE_DEVS)
-                               continue;
-                       else
-                               goto abort;
+                       continue;
                }
                sscanf(buf, "%d:%d", &dev->disk.major, &dev->disk.minor);
 
                /* special case check for block devices that can go 'offline' */
-               if (options & SKIP_GONE_DEVS) {
-                       strcpy(dbase, "block/device/state");
-                       if (load_sys(fname, buf) == 0 &&
-                           strncmp(buf, "offline", 7) == 0) {
-                               free(dev);
-                               continue;
-                       }
+               strcpy(dbase, "block/device/state");
+               if (load_sys(fname, buf) == 0 &&
+                   strncmp(buf, "offline", 7) == 0) {
+                       free(dev);
+                       continue;
                }
 
                /* finally add this disk to the array */
@@ -852,9 +850,6 @@ int WaitClean(char *dev, int sock, int verbose)
                tm.tv_sec = 5;
                tm.tv_usec = 0;
 
-               /* give mdmon a chance to checkpoint resync */
-               sysfs_set_str(mdi, NULL, "sync_action", "idle");
-
                FD_ZERO(&fds);
 
                /* wait for array_state to be clean */