Commit 6ce89004 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] md: fix typo in super_1_sync

Instead of setting one value lots of times, let's set lots of values once
each, as we should..

This fixes possible inconsistencies that might arise in a version-1 superblock
when devices fail and are removed.

Usage of version-1 superblocks is not yet widespread and no actual problems
have been reported.

From: Paul Clements <paul.clements@steeleye.com>
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6c5b4f37
...@@ -940,7 +940,7 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev) ...@@ -940,7 +940,7 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev)
sb->max_dev = cpu_to_le32(max_dev); sb->max_dev = cpu_to_le32(max_dev);
for (i=0; i<max_dev;i++) for (i=0; i<max_dev;i++)
sb->dev_roles[max_dev] = cpu_to_le16(0xfffe); sb->dev_roles[i] = cpu_to_le16(0xfffe);
ITERATE_RDEV(mddev,rdev2,tmp) { ITERATE_RDEV(mddev,rdev2,tmp) {
i = rdev2->desc_nr; i = rdev2->desc_nr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment