summaryrefslogtreecommitdiff
path: root/sysfs.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-10-30 13:34:54 +1100
committerNeilBrown <neilb@suse.de>2012-11-20 12:06:34 +1100
commit6a67848ab6dc389634673fda3ec867539a763f38 (patch)
tree23393cbc782b00437cd3c08c96d4449b9fba323c /sysfs.c
parent4610608a023b461e6e778d485a75b8a989247edb (diff)
Grow: fix reshape from RAID5 to RAID1.
Commit 5da9ab9874cb5896023afae1462550d83a869831 Grow_reshape re-factor in mdadm-3.2 broke conversion from RAID5 and RAID1 - and we never noticed. This fixes it. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'sysfs.c')
-rw-r--r--sysfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sysfs.c b/sysfs.c
index a7ff38a4..b66cebf3 100644
--- 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");