]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - sysfs.c
Grow: fix reshape from RAID5 to RAID1.
[thirdparty/mdadm.git] / sysfs.c
diff --git a/sysfs.c b/sysfs.c
index a7ff38a4d85bc6da9602cf43f5538228e1c6daf9..b66cebf32a10f72a138b5c2a60e085816bcc216e 100644 (file)
--- a/sysfs.c
+++ b/sysfs.c
@@ -176,8 +176,10 @@ struct mdinfo *sysfs_read(int fd, int devnum, unsigned long options)
        if (options & GET_CACHE) {
                strcpy(base, "stripe_cache_size");
                if (load_sys(fname, buf))
-                       goto abort;
-               sra->cache_size = strtoul(buf, NULL, 0);
+                       /* Probably level doesn't support it */
+                       sra->cache_size = 0;
+               else
+                       sra->cache_size = strtoul(buf, NULL, 0);
        }
        if (options & GET_MISMATCH) {
                strcpy(base, "mismatch_cnt");