diff options
author | NeilBrown <neilb@suse.de> | 2005-09-09 19:24:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 19:39:14 -0400 |
commit | 611815651b2640449bda928079160b9263efac1c (patch) | |
tree | 1f4edcddee9e5c238bc51e94a65d204bbaf1fafc /drivers | |
parent | 188c18fd7982d220f4dea234cbb5cc6c75d0f512 (diff) |
[PATCH] md: really get sb_size setting right in all cases
There was another case where sb_size wasn't being set, so instead do the
sensible thing and set if when filling in the content of a superblock. That
ensures that whenever we write a superblock, the sb_size MUST be set.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/md.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 8c1f7954882a..1554b924fbb9 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -712,6 +712,8 @@ static void super_90_sync(mddev_t *mddev, mdk_rdev_t *rdev) | |||
712 | int i; | 712 | int i; |
713 | int active=0, working=0,failed=0,spare=0,nr_disks=0; | 713 | int active=0, working=0,failed=0,spare=0,nr_disks=0; |
714 | 714 | ||
715 | rdev->sb_size = MD_SB_BYTES; | ||
716 | |||
715 | sb = (mdp_super_t*)page_address(rdev->sb_page); | 717 | sb = (mdp_super_t*)page_address(rdev->sb_page); |
716 | 718 | ||
717 | memset(sb, 0, sizeof(*sb)); | 719 | memset(sb, 0, sizeof(*sb)); |
@@ -2303,8 +2305,6 @@ static int add_new_disk(mddev_t * mddev, mdu_disk_info_t *info) | |||
2303 | else | 2305 | else |
2304 | rdev->in_sync = 0; | 2306 | rdev->in_sync = 0; |
2305 | 2307 | ||
2306 | rdev->sb_size = MD_SB_BYTES; | ||
2307 | |||
2308 | if (info->state & (1<<MD_DISK_WRITEMOSTLY)) | 2308 | if (info->state & (1<<MD_DISK_WRITEMOSTLY)) |
2309 | set_bit(WriteMostly, &rdev->flags); | 2309 | set_bit(WriteMostly, &rdev->flags); |
2310 | 2310 | ||