From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1OeDWY-0005W8-He for mharc-grub-devel@gnu.org; Wed, 28 Jul 2010 16:46:46 -0400 Received: from [140.186.70.92] (port=58005 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OeDWV-0005U8-FY for grub-devel@gnu.org; Wed, 28 Jul 2010 16:46:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OeDWU-0006eu-Ap for grub-devel@gnu.org; Wed, 28 Jul 2010 16:46:43 -0400 Received: from mail-gy0-f169.google.com ([209.85.160.169]:44460) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OeDWU-0006ep-72 for grub-devel@gnu.org; Wed, 28 Jul 2010 16:46:42 -0400 Received: by gyb11 with SMTP id 11so2496428gyb.0 for ; Wed, 28 Jul 2010 13:46:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type; bh=8eNmWepdNdOmA2/5Feg9uZ+BZcxRG/ZSS2ZGpR8/vWI=; b=tAQUEl87G9nJukbq1rYKnrbg36rXkBphNs7U6n31TA0DC/a6h3fkKW4nP6YEDsr9XX X4iTWg1TDhbmg/DW/QhsWZX8KdoTwFkIdVymPwsQGAcvRpD3nnWyLMkVVRJ7j9bZSNVY LqIyKeBJPYBbEaapmvQavo+gZozReipQQipmY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; b=JWMMV2W2D1eWYd81k4BgCzpQyCXqiaMlaFvxcQgniaMpHQOGOImsq4/noHnNQ1JTlH F2b3xuNGJwwZQKdvhLnT9/JUfELwU4PcL94d441REMQv1QjD3+nVt9I9yHnOmZ+R2fX9 uvpPwwQdpza2fCNovXP3mVgbc7r7AKPe92Ah8= Received: by 10.100.227.7 with SMTP id z7mr7100440ang.102.1280350001341; Wed, 28 Jul 2010 13:46:41 -0700 (PDT) Received: from [192.168.21.179] (bas1-toronto05-1177663517.dsl.bell.ca [70.49.184.29]) by mx.google.com with ESMTPS id u14sm9362ann.0.2010.07.28.13.46.40 (version=SSLv3 cipher=RC4-MD5); Wed, 28 Jul 2010 13:46:40 -0700 (PDT) Message-ID: <4C50972F.8080300@gmail.com> Date: Wed, 28 Jul 2010 16:46:39 -0400 From: Doug Nazar User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1 MIME-Version: 1.0 To: grub-devel@gnu.org References: <20100727152625.GX2632@caffeine.csclub.uwaterloo.ca> <4C4FEF8C.5060200@gmail.com> <20100728150037.GC2632@caffeine.csclub.uwaterloo.ca> <20100728155158.GE2632@caffeine.csclub.uwaterloo.ca> <4C505B37.2020009@gmail.com> <20100728170155.GG2632@caffeine.csclub.uwaterloo.ca> <4C5064F0.6000501@gmail.com> <20100728174219.GI2632@caffeine.csclub.uwaterloo.ca> <20100728175237.GJ2632@caffeine.csclub.uwaterloo.ca> <4C507426.1000209@gmail.com> <20100728184936.GK2632@caffeine.csclub.uwaterloo.ca> In-Reply-To: <20100728184936.GK2632@caffeine.csclub.uwaterloo.ca> Content-Type: multipart/mixed; boundary="------------020003000101060100080607" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: Big Endian fix patch X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 20:46:45 -0000 This is a multi-part message in MIME format. --------------020003000101060100080607 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 2010-07-28 2:49 PM, Lennart Sorensen wrote: > > 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 drives. Ok, it was an endian issue. Here's the patch. Doug --------------020003000101060100080607 Content-Type: text/plain; name="mdadm-assemble-roles-endian-fix.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="mdadm-assemble-roles-endian-fix.diff" --- 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; } --------------020003000101060100080607--