[PATCH md 001 of 3] Really get sb_size setting right in all cases.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>

### Diffstat output
 ./drivers/md/md.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff ./drivers/md/md.c~current~ ./drivers/md/md.c
--- ./drivers/md/md.c~current~	2005-09-02 19:29:31.000000000 +1000
+++ ./drivers/md/md.c	2005-09-05 14:47:45.000000000 +1000
@@ -712,6 +712,8 @@ static void super_90_sync(mddev_t *mddev
 	int i;
 	int active=0, working=0,failed=0,spare=0,nr_disks=0;
 
+	rdev->sb_size = MD_SB_BYTES;
+
 	sb = (mdp_super_t*)page_address(rdev->sb_page);
 
 	memset(sb, 0, sizeof(*sb));
@@ -2303,8 +2305,6 @@ static int add_new_disk(mddev_t * mddev,
 		else
 			rdev->in_sync = 0;
 
-		rdev->sb_size = MD_SB_BYTES;
-
 		if (info->state & (1<<MD_DISK_WRITEMOSTLY))
 			set_bit(WriteMostly, &rdev->flags);
 
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux