From: Lidong Zhong Date: Mon, 12 Jun 2017 02:45:55 +0000 (+0800) Subject: md: change the initialization value for a spare device spot to MD_DISK_ROLE_SPARE X-Git-Tag: v4.13-rc1~89^2~3 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=8df72024393cdba2543e55d51297f2b2c4ede46f;p=linux.git md: change the initialization value for a spare device spot to MD_DISK_ROLE_SPARE The value for spare spot of sb->dev_roles is changed from MD_DISK_ROLE_FAULTY to MD_DISK_ROLE_SPARE to keep align with the value when the superblock is firstly created in userspace. Signed-off-by: Lidong Zhong Signed-off-by: Shaohua Li --- diff --git a/drivers/md/md.c b/drivers/md/md.c index d7847014821a..528c1452ce54 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -1857,7 +1857,7 @@ static void super_1_sync(struct mddev *mddev, struct md_rdev *rdev) max_dev = le32_to_cpu(sb->max_dev); for (i=0; idev_roles[i] = cpu_to_le16(MD_DISK_ROLE_FAULTY); + sb->dev_roles[i] = cpu_to_le16(MD_DISK_ROLE_SPARE); if (test_bit(MD_HAS_JOURNAL, &mddev->flags)) sb->feature_map |= cpu_to_le32(MD_FEATURE_JOURNAL);