diff options
author | NeilBrown <neilb@suse.de> | 2005-09-09 19:24:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 19:39:14 -0400 |
commit | 188c18fd7982d220f4dea234cbb5cc6c75d0f512 (patch) | |
tree | 90eb6739ad6e0c823595e3f68964e64899d252e0 | |
parent | b325a32e5732d7aef70ca3c58acb3953ed20f66c (diff) |
[PATCH] md: make sure the new 'sb_size' is set properly device added without pre-existing superblock.
There are two ways to add devices to an md/raid array.
It can have superblock written to it, and then given to the md driver,
which will read the superblock (the new way)
or
md can be told (through SET_ARRAY_INFO) the shape of the array, and
the told about individual drives, and md will create the required
superblock (the old way).
The newly introduced sb_size was only set for drives being added the
new way, not the old ways. Oops :-(
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/md/md.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index f27e8f644dfe..8c1f7954882a 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -2303,6 +2303,8 @@ static int add_new_disk(mddev_t * mddev, mdu_disk_info_t *info) | |||
2303 | else | 2303 | else |
2304 | rdev->in_sync = 0; | 2304 | rdev->in_sync = 0; |
2305 | 2305 | ||
2306 | rdev->sb_size = MD_SB_BYTES; | ||
2307 | |||
2306 | if (info->state & (1<<MD_DISK_WRITEMOSTLY)) | 2308 | if (info->state & (1<<MD_DISK_WRITEMOSTLY)) |
2307 | set_bit(WriteMostly, &rdev->flags); | 2309 | set_bit(WriteMostly, &rdev->flags); |
2308 | 2310 | ||