* [PATCH md ] Make sure the new 'sb_size' is set properly device added without pre-existing superblock.
[not found] <20050902224642.1518.patches@notabene>
@ 2005-09-02 12:48 ` NeilBrown
0 siblings, 0 replies; only message in thread
From: NeilBrown @ 2005-09-02 12:48 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-raid
Looks like I should run my test suite with both mdadm-1.12 and mdadm-2.0,
as this slipped through my testing. (The bug is in code that
didn't reach 2.6.13. Only -mm is affected).
Thanks,
NeilBrown
### Comments for Changeset
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>
### Diffstat output
./drivers/md/md.c | 2 ++
1 file changed, 2 insertions(+)
diff ./drivers/md/md.c~current~ ./drivers/md/md.c
--- ./drivers/md/md.c~current~ 2005-09-02 16:00:04.000000000 +1000
+++ ./drivers/md/md.c 2005-09-02 19:29:31.000000000 +1000
@@ -2303,6 +2303,8 @@ 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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-09-02 12:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20050902224642.1518.patches@notabene>
2005-09-02 12:48 ` [PATCH md ] Make sure the new 'sb_size' is set properly device added without pre-existing superblock NeilBrown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).