Re: [PATCH] ANNOUNCE: mdadm 2.5.1 - A tool for managing Soft RAID under Linux
On Monday June 19, [EMAIL PROTECTED] wrote: > > Neil Brown wrote: > > I am pleased to announce the availability of > >mdadm version 2.5.1 > > What the heck, here's another one. :) This one is slightly more serious. > We're getting a device of "0:0" in "Fail" events from the mdadm monitor > sometimes now (due to the change in map_dev, which allows it to > sometimes return "0:0" instead of just NULL for an unknown device). > Thanks for this and the other two. They are now in .git > The patch fixes my issue. I don't know if there are more. > I chose to do this differently - map_dev will now return NULL for 0,0 and all users can cope with a NULL. NeilBrown > Thanks, > Paul > --- mdadm-2.5.1/Monitor.c Thu Jun 1 21:33:41 2006 > +++ mdadm-2.5.1-new/Monitor.c Mon Jun 19 14:51:31 2006 > @@ -328,7 +328,7 @@ int Monitor(mddev_dev_t devlist, > } > disc.major = disc.minor = 0; > } > - if (dv == NULL && st->devid[i]) > + if ((dv == NULL || strcmp(dv, "0:0") == 0) && > st->devid[i]) > dv = map_dev(major(st->devid[i]), >minor(st->devid[i]), 1); > change = newstate ^ st->devstate[i]; - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ANNOUNCE: mdadm 2.5.1 - A tool for managing Soft RAID under Linux
Paul Clements wrote: --- super1.c2006-06-19 05:17:36.0 -0400 +++ /export/public/clemep/tmp/super1-ppc-compile-error.c2006-06-19 00:40:26.0 -0400 @@ -124,8 +124,11 @@ static unsigned int calc_sb_1_csum(struc disk_csum = sb->sb_csum; sb->sb_csum = 0; newcsum = 0; - for (i=0; size>=4; size -= 4 ) - newcsum += __le32_to_cpu(*isuper++); + for (i=0; size>=4; size -= 4 ) { + unsigned int *x = isuper; + newcsum += __le32_to_cpu(*x); + x++; + } Should be more like: for (i=0; size>=4; size -= 4 ) { newcsum += __le32_to_cpu(*isuper); isuper++; } Duh... :) - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ANNOUNCE: mdadm 2.5.1 - A tool for managing Soft RAID under Linux
Neil Brown wrote: I am pleased to announce the availability of mdadm version 2.5.1 What the heck, here's another one. :) This one is slightly more serious. We're getting a device of "0:0" in "Fail" events from the mdadm monitor sometimes now (due to the change in map_dev, which allows it to sometimes return "0:0" instead of just NULL for an unknown device). The patch fixes my issue. I don't know if there are more. Thanks, Paul --- mdadm-2.5.1/Monitor.c Thu Jun 1 21:33:41 2006 +++ mdadm-2.5.1-new/Monitor.c Mon Jun 19 14:51:31 2006 @@ -328,7 +328,7 @@ int Monitor(mddev_dev_t devlist, } disc.major = disc.minor = 0; } - if (dv == NULL && st->devid[i]) + if ((dv == NULL || strcmp(dv, "0:0") == 0) && st->devid[i]) dv = map_dev(major(st->devid[i]), minor(st->devid[i]), 1); change = newstate ^ st->devstate[i];
Re: [PATCH] ANNOUNCE: mdadm 2.5.1 - A tool for managing Soft RAID under Linux
Bill Davidsen wrote: Paul Clements wrote: Neil Brown wrote: I am pleased to announce the availability of mdadm version 2.5.1 and here's another patch for a compile error on ppc... Since ppc is big endian, the compiler is complaining because it can't determine whether the isuper post-increment (++) is actually going to be evaluated (__le32_to_cpu is a macro). On x86 the macro is a no-op, so I guess the compiler is smart enough to figure out that the post-increment is actually happening? Here's the warning (gcc 3.2.3): $ make gcc -Wall -Werror -Wstrict-prototypes -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" -c -o super1.o super1.c cc1: warnings being treated as errors super1.c: In function `calc_sb_1_csum': super1.c:128: warning: operation on `isuper' may be undefined super1.c:128: warning: operation on `isuper' may be undefined super1.c:128: warning: operation on `isuper' may be undefined make: *** [super1.o] Error 1 Thanks, Paul --- super1.c2006-06-19 05:17:36.0 -0400 +++ /export/public/clemep/tmp/super1-ppc-compile-error.c2006-06-19 00:40:26.0 -0400 @@ -124,8 +124,11 @@ static unsigned int calc_sb_1_csum(struc disk_csum = sb->sb_csum; sb->sb_csum = 0; newcsum = 0; - for (i=0; size>=4; size -= 4 ) - newcsum += __le32_to_cpu(*isuper++); + for (i=0; size>=4; size -= 4 ) { + unsigned int *x = isuper; + newcsum += __le32_to_cpu(*x); + x++; + } if (size == 2) newcsum += __le16_to_cpu(*(unsigned short*) isuper);