From: Doug Nazar <nazard.michi@gmail.com>
To: linux-raid@vger.kernel.org
Subject: Fwd: Endian issue assembling arrays
Date: Wed, 15 Sep 2010 18:20:18 -0400 [thread overview]
Message-ID: <4C9146A2.2020305@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 529 bytes --]
Has anyone had a chance to look at this?
Thanks,
Doug
-------- Original Message --------
Subject: Endian issue assembling arrays
Date: Wed, 28 Jul 2010 16:53:47 -0400
From: Doug Nazar <nazard.michi@gmail.com>
To: linux-raid@vger.kernel.org
Came across this while testing some updates to GRUB's RAID support.
Assembling a RAID1 array on a PPC box results in the following warning:
mdadm: device 1 in /dev/md/0 has wrong state in superblock, but
/dev/sdb2 seems ok
mdadm: /dev/md/0 has been started with 2
Doug
[-- Attachment #2: mdadm-assemble-roles-endian-fix.diff --]
[-- Type: text/plain, Size: 461 bytes --]
--- mdadm-3.1.2/super1.c 2010-03-09 18:26:44.000000000 -0500
+++ mdadm-3.1.2.dev/super1.c 2010-07-28 16:41:41.000000000 -0400
@@ -673,10 +673,10 @@
int d = info->disk.number;
int want;
if (info->disk.state == 6)
- want = __cpu_to_le32(info->disk.raid_disk);
+ want = info->disk.raid_disk;
else
want = 0xFFFF;
- if (sb->dev_roles[d] != want) {
+ if (__le16_to_cpu(sb->dev_roles[d]) != want) {
sb->dev_roles[d] = want;
rv = 1;
}
reply other threads:[~2010-09-15 22:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4C9146A2.2020305@gmail.com \
--to=nazard.michi@gmail.com \
--cc=linux-raid@vger.kernel.org \
/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 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).