When managemon is signaled by monitor (using reshape_delta_disks variable), it adds new disks to md configuration. To allow md to set slot numbers, flag SYSFS_ADD_DISK_DO_NOT_SET_SLOT was introduced to skip slot setting in sysfs_add_disk() function. Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> --- sysfs.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/sysfs.c b/sysfs.c index e316785..fa15895 100644 --- a/sysfs.c +++ b/sysfs.c @@ -614,7 +614,8 @@ int sysfs_add_disk(struct mdinfo *sra, struct mdinfo *sd, int resume) * yet, so just ignore status for now. */ sysfs_set_str(sra, sd, "state", "insync"); - rv |= sysfs_set_num(sra, sd, "slot", sd->disk.raid_disk); + if (sd->disk.raid_disk >= 0) + rv |= sysfs_set_num(sra, sd, "slot", sd->disk.raid_disk); if (resume) sysfs_set_num(sra, sd, "recovery_start", sd->recovery_start); } -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html