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; - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html