Linux RAID subsystem development
 help / color / mirror / Atom feed
From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Thomas Steudten <alpha@steudten.com>
Cc: Norbert Preining <preining@logic.at>,
	linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org,
	mingo@redhat.com, neilb@cse.unsw.edu.au
Subject: Re: md raid oops on 2.4.25/alpha
Date: Sun, 28 Mar 2004 22:30:13 +0400	[thread overview]
Message-ID: <20040328223013.A15859@jurassic.park.msu.ru> (raw)
In-Reply-To: <40670BAE.4060901@steudten.com>; from alpha@steudten.com on Sun, Mar 28, 2004 at 07:30:22PM +0200

On Sun, Mar 28, 2004 at 07:30:22PM +0200, Thomas Steudten wrote:
> Looks like the well known bad assembler code with gcc.
> On the alpha you see the problem first in the
> raid1_read_balance() code sequence..

Very likely.

> You should use gcc 3.3.2 better 3.3.3.

Also, here is a hack (originally from Jay Estabrook) which
should work around a bug in older compilers.

Ivan.

--- linux.orig/drivers/md/raid1.c	Thu Feb  5 14:11:04 2004
+++ linux/drivers/md/raid1.c	Sun Mar 28 22:13:33 2004
@@ -487,6 +487,12 @@ static int raid1_read_balance (raid1_con
 		goto rb_out;
 	
 
+#if defined(CONFIG_ALPHA) && ((__GNUC__ < 3) || \
+			      ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3)))
+	/* Work around a compiler bug in older gcc */
+	new_disk = *(volatile int *)&new_disk;
+#endif
+
 	/* make sure that disk is operational */
 	while( !conf->mirrors[new_disk].operational) {
 		if (new_disk <= 0) new_disk = conf->raid_disks;
@@ -544,6 +550,11 @@ static int raid1_read_balance (raid1_con
 	
 	/* Find the disk which is closest */
 	
+#if defined(CONFIG_ALPHA) && ((__GNUC__ < 3) || \
+			      ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3)))
+	/* Work around a compiler bug in older gcc */
+	disk = *(volatile int *)&disk;
+#endif
 	do {
 		if (disk <= 0)
 			disk = conf->raid_disks;

  reply	other threads:[~2004-03-28 18:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20031027141358.GA26271@gamma.logic.tuwien.ac.at>
2004-03-27 16:41 ` Oops with md/ext3 on 2.4.25 on alpha architecture Norbert Preining
2004-03-28 16:02   ` md raid oops on 2.4.25/alpha Norbert Preining
2004-03-28 17:30     ` Thomas Steudten
2004-03-28 18:30       ` Ivan Kokshaysky [this message]
2004-03-29 10:41         ` Thomas Steudten
     [not found]       ` <200403290245.51813.ross@datscreative.com.au>
2004-03-28 20:32         ` Norbert Preining
2004-04-02  7:28 Lewis Shobbrook

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=20040328223013.A15859@jurassic.park.msu.ru \
    --to=ink@jurassic.park.msu.ru \
    --cc=alpha@steudten.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=neilb@cse.unsw.edu.au \
    --cc=preining@logic.at \
    /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