summaryrefslogtreecommitdiffstats
path: root/sysfs.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-12-14 17:31:16 +1100
committerNeil Brown <neilb@suse.de>2006-12-14 17:31:16 +1100
commit758d3a8e7d3e0620d68d3b9e72ef0747319c6dac (patch)
tree313ba9725ec6165b42ffdfda6353f62c289de057 /sysfs.c
parent583315d9c522c310c89d5640ae884ef7984b9c30 (diff)
downloadmdadm-758d3a8e7d3e0620d68d3b9e72ef0747319c6dac.tar.gz
mdadm-758d3a8e7d3e0620d68d3b9e72ef0747319c6dac.tar.xz
mdadm-758d3a8e7d3e0620d68d3b9e72ef0747319c6dac.zip
Increase raid456 stripe cache size if needed to --grow the array.
The setting used unfortunately requires intimate knowledge of the kernel, and it not reset when the reshape finishes.
Diffstat (limited to 'sysfs.c')
-rw-r--r--sysfs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysfs.c b/sysfs.c
index 35b8883..166481f 100644
--- 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;