diff options
author | Lidong Zhong <lzhong@suse.com> | 2017-06-11 22:45:55 -0400 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2017-06-16 15:04:09 -0400 |
commit | 8df72024393cdba2543e55d51297f2b2c4ede46f (patch) | |
tree | ef9669ec976e9687f62cebeb4e1113060e3a4cce | |
parent | 037d2ff62cbfd3adf634553fbc25c9af7c25a702 (diff) |
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 <lzhong@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
-rw-r--r-- | drivers/md/md.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ retry: | |||
1857 | max_dev = le32_to_cpu(sb->max_dev); | 1857 | max_dev = le32_to_cpu(sb->max_dev); |
1858 | 1858 | ||
1859 | for (i=0; i<max_dev;i++) | 1859 | for (i=0; i<max_dev;i++) |
1860 | sb->dev_roles[i] = cpu_to_le16(MD_DISK_ROLE_FAULTY); | 1860 | sb->dev_roles[i] = cpu_to_le16(MD_DISK_ROLE_SPARE); |
1861 | 1861 | ||
1862 | if (test_bit(MD_HAS_JOURNAL, &mddev->flags)) | 1862 | if (test_bit(MD_HAS_JOURNAL, &mddev->flags)) |
1863 | sb->feature_map |= cpu_to_le32(MD_FEATURE_JOURNAL); | 1863 | sb->feature_map |= cpu_to_le32(MD_FEATURE_JOURNAL); |