From: Mike Tran <mhtran@us.ibm.com>
To: Neil Brown <neilb@cse.unsw.edu.au>
Cc: linux-raid@vger.kernel.org
Subject: [PATCH] Version 1 super block
Date: Sat, 15 Jan 2005 20:50:22 -0600 [thread overview]
Message-ID: <41E9D66E.9080100@us.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 221 bytes --]
Hello Neil,
I found 2 problems in the kernel MD driver:
1) if disk index 0 is used, counting of max_dev is wrong
2) missing checksum calculation
Please consider the attached patch for 2.6.10 kernel.
--
Thanks,
Mike T.
[-- Attachment #2: md-2.6.10.patch --]
[-- Type: text/plain, Size: 599 bytes --]
--- a/linux-2.6.10/drivers/md/md.c 2005-01-15 07:52:14.000000000 -0600
+++ b/linux-2.6.10/drivers/md/md.c 2005-01-15 07:52:14.000000000 -0600
@@ -939,9 +939,13 @@
sb->resync_offset = cpu_to_le64(0);
max_dev = 0;
- ITERATE_RDEV(mddev,rdev2,tmp)
+ i = 0;
+ ITERATE_RDEV(mddev,rdev2,tmp) {
+ i++;
if (rdev2->desc_nr > max_dev)
max_dev = rdev2->desc_nr;
+ }
+ max_dev = max(max_dev, i);
sb->max_dev = cpu_to_le32(max_dev);
for (i=0; i<max_dev;i++)
@@ -958,6 +962,7 @@
}
sb->recovery_offset = cpu_to_le64(0); /* not supported yet */
+ sb->sb_csum = calc_sb_1_csum(sb);
}
next reply other threads:[~2005-01-16 2:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-16 2:50 Mike Tran [this message]
2005-01-21 15:59 ` [PATCH] Version 1 super block Mike Tran
2005-01-24 1:38 ` Neil Brown
2005-01-24 19:16 ` Mike Tran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41E9D66E.9080100@us.ibm.com \
--to=mhtran@us.ibm.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@cse.unsw.edu.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.