diff options
-rw-r--r-- | Grow.c | 4 | ||||
-rw-r--r-- | sysfs.c | 6 |
2 files changed, 7 insertions, 3 deletions
@@ -1281,7 +1281,9 @@ char *analyse_change(struct mdinfo *info, struct reshape *re) return "Cannot set raid_disk when " "converting RAID5->RAID1"; re->level = 1; - break; + re->backup_blocks = 0; + info->new_chunk = 0; + return NULL; default: return "Impossible level change requested"; } @@ -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"); |