From: Bill Davidsen <davidsen@tmr.com>
To: Neil Brown <neilb@suse.de>
Cc: "Mr. James W. Laferriere" <babydr@baby-dragons.com>,
linux-raid maillist <linux-raid@vger.kernel.org>
Subject: Re: ANNOUNCE: mdadm 3.0 - A tool for managing Soft RAID under Linux
Date: Sat, 06 Jun 2009 19:15:17 -0400 [thread overview]
Message-ID: <4A2AF885.6060309@tmr.com> (raw)
In-Reply-To: <18983.12764.413037.150661@notabene.brown>
Neil Brown wrote:
> On Wednesday June 3, babydr@baby-dragons.com wrote:
>
>> Hello Neil , I am getting a interesting Error during compiling 3.0 .
>> Is there a particular version of kernel that 3.0 is supposed to be
>> compiled with ?
>>
>
> This has nothing to do with kernel version. You must be using a
> different compiler version - it is picking up an error that might
> didn't.
>
> The fix is below.
> Thanks,
> NeilBrown
>
>
>
>> Tia , JimL
>>
>> gcc -Wall -Werror -Wstrict-prototypes -ggdb -DSendmail=\""/usr/sbin/sendmail
>> -t"\" -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" -c
>> -o super-intel.o super-intel.c
>> cc1: warnings being treated as errors
>> super-intel.c: In function 'mark_failure':
>> super-intel.c:3632: warning: comparison is always false due to limited range of
>> data type
>> make: *** [super-intel.o] Error 1
>>
>>
>
> commit 4291d691b66f65695b5b4be22b80fd00da73b544
> Author: NeilBrown <neilb@suse.de>
> Date: Thu Jun 4 12:29:21 2009 +1000
>
> super-intel: fix test on failed_disk_num.
>
> We sometimes set failed_disk_num to ~0.
> However we cannot test for equality with that as failed_disk_num
> is 8bit and ~0 is probably 32bit with lots of 1's.
> So test if ~failed_disk_num is 0 instead.
>
> Reported-By: "Mr. James W. Laferriere" <babydr@baby-dragons.com>
> Signed-off-by: NeilBrown <neilb@suse.de>
>
> diff --git a/super-intel.c b/super-intel.c
> index 73fe5fa..7e2a086 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -3629,7 +3629,7 @@ static int mark_failure(struct imsm_dev *dev, struct imsm_disk *disk, int idx)
>
> disk->status |= FAILED_DISK;
> set_imsm_ord_tbl_ent(map, slot, idx | IMSM_ORD_REBUILD);
> - if (map->failed_disk_num == ~0)
> + if (~map->failed_disk_num == 0)
> map->failed_disk_num = slot;
> return 1;
> }
>
I still don't think this is really portable, the zero should be cast
using typeof.
--
Bill Davidsen <davidsen@tmr.com>
Even purely technical things can appear to be magic, if the documentation is
obscure enough. For example, PulseAudio is configured by dancing naked around a
fire at midnight, shaking a rattle with one hand and a LISP manual with the
other, while reciting the GNU manifesto in hexadecimal. The documentation fails
to note that you must circle the fire counter-clockwise in the southern
hemisphere.
next prev parent reply other threads:[~2009-06-06 23:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-02 5:50 ANNOUNCE: mdadm 3.0 - A tool for managing Soft RAID under Linux Neil Brown
2009-06-02 20:11 ` Jeff Garzik
2009-06-02 22:58 ` Dan Williams
2009-06-03 3:56 ` Neil Brown
2009-06-03 13:01 ` Anton Altaparmakov
2009-06-03 22:59 ` Neil Brown
2009-06-04 9:00 ` Anton Altaparmakov
2009-06-03 14:42 ` Heinz Mauelshagen
2009-06-03 17:26 ` [dm-devel] " Dan Williams
2009-06-04 16:38 ` Heinz Mauelshagen
2009-06-08 23:32 ` [dm-devel] " Neil Brown
2009-06-09 16:29 ` Heinz Mauelshagen
2009-06-04 15:33 ` Larry Dickson
2009-06-04 1:52 ` Mr. James W. Laferriere
2009-06-04 2:30 ` Neil Brown
2009-06-06 23:15 ` Bill Davidsen [this message]
2009-06-08 23:36 ` Neil Brown
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=4A2AF885.6060309@tmr.com \
--to=davidsen@tmr.com \
--cc=babydr@baby-dragons.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/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).