]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - sysfs.c
Increase raid456 stripe cache size if needed to --grow the array.
[thirdparty/mdadm.git] / sysfs.c
diff --git a/sysfs.c b/sysfs.c
index 35b8883614e2e7797f622aec07264588a6609b48..166481f1a54580f652d191a932251dfbfa4190bd 100644 (file)
--- a/sysfs.c
+++ b/sysfs.c
@@ -107,6 +107,12 @@ struct sysarray *sysfs_read(int fd, int devnum, unsigned long options)
                        goto abort;
                sra->chunk = strtoul(buf, NULL, 0);
        }
+       if (options & GET_CACHE) {
+               strcpy(base, "stripe_cache_size");
+               if (load_sys(fname, buf))
+                       goto abort;
+               sra->cache_size = strtoul(buf, NULL, 0);
+       }
 
        if (! (options & GET_DEVS))
                return sra;