]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - super1.c
Increase raid456 stripe cache size if needed to --grow the array.
[thirdparty/mdadm.git] / super1.c
index 368d9bcf3e6fcf055f64cae56098a64e935cdcaf..1890949740d971a70f53d1a303e1a43baa77a94d 100644 (file)
--- a/super1.c
+++ b/super1.c
@@ -429,6 +429,7 @@ static void getinfo_super1(struct mdinfo *info, void *sbv)
        info->array.ctime = __le64_to_cpu(sb->ctime);
        info->array.utime = __le64_to_cpu(sb->utime);
        info->array.chunk_size = __le32_to_cpu(sb->chunksize)*512;
+       info->array.state = (__le64_to_cpu(sb->resync_offset)+1) ? 0 : 1;
 
        info->data_offset = __le64_to_cpu(sb->data_offset);
        info->component_size = __le64_to_cpu(sb->size);
@@ -524,7 +525,9 @@ static int update_super1(struct mdinfo *info, void *sbv, char *update,
        }
        if (strcmp(update, "grow") == 0) {
                sb->raid_disks = __cpu_to_le32(info->array.raid_disks);
-               /* FIXME */
+               /* As we are just adding a spare, there is no need to
+                * make any change to the dev_roles array
+                */
        }
        if (strcmp(update, "resync") == 0) {
                /* make sure resync happens */