]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - super-intel.c
imsm: More precise message when spanned raid is created
[thirdparty/mdadm.git] / super-intel.c
index cf5d8226996a7a5274e5c229387ed8695aa61ee7..2f912f220919822258b974983924bd6b509c41a5 100644 (file)
@@ -3502,6 +3502,9 @@ static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info, char *
                        __u32 ord = get_imsm_ord_tbl_ent(dev, j, MAP_0);
                        __u32 idx = ord_to_idx(ord);
 
+                       if (super->disks && super->disks->index == (int)idx)
+                               info->disk.raid_disk = j;
+
                        if (!(ord & IMSM_ORD_REBUILD) &&
                            get_imsm_missing(super, idx)) {
                                missing = 1;
@@ -4497,8 +4500,7 @@ static int find_intel_hba_capability(int fd, struct intel_super *super, char *de
                                hba = hba->next;
                        }
                        fprintf(stderr, ").\n"
-                               "    Mixing devices attached to different %s is not allowed.\n",
-                               hba_name->type == SYS_DEV_VMD ? "VMD domains" : "controllers");
+                               "    Mixing devices attached to different controllers is not allowed.\n");
                }
                return 2;
        }
@@ -6227,7 +6229,10 @@ out:
 
                if (map->map_state == IMSM_T_STATE_UNINITIALIZED ||
                   (map->map_state == IMSM_T_STATE_NORMAL &&
-                  !(dev->vol.dirty & RAIDVOL_DIRTY)))
+                  !(dev->vol.dirty & RAIDVOL_DIRTY)) ||
+                  (dev->vol.migr_state == MIGR_REBUILD &&
+                   dev->vol.curr_migr_unit == 0 &&
+                   get_imsm_disk_idx(dev, disk->disk.raid_disk, MAP_1) != idx))
                        ret = st->ss->write_init_ppl(st, info, d->fd);
                else
                        info->mismatch_cnt++;