linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ANNOUNCE: mdadm 2.6.2 - A tool for managing Soft RAID under Linux
@ 2007-05-21  4:55 Neil Brown
  2007-05-29 16:29 ` Thomas Jarosch
  0 siblings, 1 reply; 5+ messages in thread
From: Neil Brown @ 2007-05-21  4:55 UTC (permalink / raw)
  To: linux-raid


I am pleased to announce the availability of
   mdadm version 2.6.2

It is available at the usual places:
   http://www.cse.unsw.edu.au/~neilb/source/mdadm/
and
   countrycode=xx.
   http://www.${countrycode}kernel.org/pub/linux/utils/raid/mdadm/
and via git at
   git://neil.brown.name/mdadm
   http://neil.brown.name/git?p=mdadm

mdadm is a tool for creating, managing and monitoring
device arrays using the "md" driver in Linux, also
known as Software RAID arrays.

Release 2.6.2  adds a  few minor bug  fixes to 2.6.1

Changelog Entries:
    -   --fail detached and --remove faulty can be used to fail and
	remove devices that are no longer physically present.
    -   --export option for --detail or present information in a format
	that can be processed by udev.
    -   fix internal bitmap allocation problems with v1.1, v1.2 metadata.
    -   --help now goes to stdout so you can direct it to a pager.
    -   Various manpage updates.
    -   Make "--grow --add" for linear arrays really work.
    -   --auto-detect to trigger in-kernel autodetect.
    -   Make return code for "--detail --test" more reliable.  Missing
	devices as well as failed devices cause an error.

Development of mdadm is sponsored by
 SUSE Labs, Novell Inc.

NeilBrown  21st May 2007

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ANNOUNCE: mdadm 2.6.2 - A tool for managing Soft RAID under Linux
  2007-05-21  4:55 ANNOUNCE: mdadm 2.6.2 - A tool for managing Soft RAID under Linux Neil Brown
@ 2007-05-29 16:29 ` Thomas Jarosch
  2007-05-29 20:49   ` Neil Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Jarosch @ 2007-05-29 16:29 UTC (permalink / raw)
  To: linux-raid

Hello Neil,

On Monday, 21. May 2007, you wrote:
> I am pleased to announce the availability of
>    mdadm version 2.6.2

Thanks for releasing mdadm 2.6.2. It contains a fix for "--test"
I was looking for right at the moment :-)

mdadm fails to compile if you enable "-O2" using gcc 4.1.1 because of -Werror:

cc1: warnings being treated as errors
sysfs.c: In function 'sysfs_read':
sysfs.c:97: warning: value computed is not used
sysfs.c:119: warning: value computed is not used
sysfs.c:127: warning: value computed is not used
sysfs.c:133: warning: value computed is not used
sysfs.c:139: warning: value computed is not used
sysfs.c:178: warning: value computed is not used


Cheers,
Thomas

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ANNOUNCE: mdadm 2.6.2 - A tool for managing Soft RAID under Linux
  2007-05-29 16:29 ` Thomas Jarosch
@ 2007-05-29 20:49   ` Neil Brown
  2007-05-30  6:23     ` Holger Kiehl
  2007-05-30  9:43     ` Thomas Jarosch
  0 siblings, 2 replies; 5+ messages in thread
From: Neil Brown @ 2007-05-29 20:49 UTC (permalink / raw)
  To: Thomas Jarosch; +Cc: linux-raid

On Tuesday May 29, thomas.jarosch@intra2net.com wrote:
> Hello Neil,
> 
> On Monday, 21. May 2007, you wrote:
> > I am pleased to announce the availability of
> >    mdadm version 2.6.2
> 
> Thanks for releasing mdadm 2.6.2. It contains a fix for "--test"
> I was looking for right at the moment :-)
> 
> mdadm fails to compile if you enable "-O2" using gcc 4.1.1 because of -Werror:
> 
> cc1: warnings being treated as errors
> sysfs.c: In function 'sysfs_read':
> sysfs.c:97: warning: value computed is not used
> sysfs.c:119: warning: value computed is not used
> sysfs.c:127: warning: value computed is not used
> sysfs.c:133: warning: value computed is not used
> sysfs.c:139: warning: value computed is not used
> sysfs.c:178: warning: value computed is not used

Those are bogus warnings. Each is
	strcpy(base, "xxxxx");
and base most certainly is used., though I can see how gcc might not
notice if it is being too clever. Maybe you need to get gcc-4.1.2?
or 
   make CWFLAGS=-Wall

Thanks for the report.

NeilBrown

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ANNOUNCE: mdadm 2.6.2 - A tool for managing Soft RAID under Linux
  2007-05-29 20:49   ` Neil Brown
@ 2007-05-30  6:23     ` Holger Kiehl
  2007-05-30  9:43     ` Thomas Jarosch
  1 sibling, 0 replies; 5+ messages in thread
From: Holger Kiehl @ 2007-05-30  6:23 UTC (permalink / raw)
  To: Neil Brown; +Cc: Thomas Jarosch, linux-raid

On Wed, 30 May 2007, Neil Brown wrote:

> On Tuesday May 29, thomas.jarosch@intra2net.com wrote:
>> Hello Neil,
>>
>> On Monday, 21. May 2007, you wrote:
>>> I am pleased to announce the availability of
>>>    mdadm version 2.6.2
>>
>> Thanks for releasing mdadm 2.6.2. It contains a fix for "--test"
>> I was looking for right at the moment :-)
>>
>> mdadm fails to compile if you enable "-O2" using gcc 4.1.1 because of -Werror:
>>
>> cc1: warnings being treated as errors
>> sysfs.c: In function 'sysfs_read':
>> sysfs.c:97: warning: value computed is not used
>> sysfs.c:119: warning: value computed is not used
>> sysfs.c:127: warning: value computed is not used
>> sysfs.c:133: warning: value computed is not used
>> sysfs.c:139: warning: value computed is not used
>> sysfs.c:178: warning: value computed is not used
>
> Those are bogus warnings. Each is
> 	strcpy(base, "xxxxx");
> and base most certainly is used., though I can see how gcc might not
> notice if it is being too clever. Maybe you need to get gcc-4.1.2?
> or
>   make CWFLAGS=-Wall
>
Maybe the compiler warns about the return of strcpy() not being used.
The correct fix would then be:

        (void)strcpy(base, "xxxxx");

Holger


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ANNOUNCE: mdadm 2.6.2 - A tool for managing Soft RAID under Linux
  2007-05-29 20:49   ` Neil Brown
  2007-05-30  6:23     ` Holger Kiehl
@ 2007-05-30  9:43     ` Thomas Jarosch
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas Jarosch @ 2007-05-30  9:43 UTC (permalink / raw)
  To: linux-raid

[-- Attachment #1: Type: text/plain, Size: 784 bytes --]

Neil,

On Tuesday, 29. May 2007, you wrote:
> > cc1: warnings being treated as errors
> > sysfs.c: In function 'sysfs_read':
> > sysfs.c:97: warning: value computed is not used
> > sysfs.c:119: warning: value computed is not used
> > sysfs.c:127: warning: value computed is not used
> > sysfs.c:133: warning: value computed is not used
> > sysfs.c:139: warning: value computed is not used
> > sysfs.c:178: warning: value computed is not used
>
> Those are bogus warnings. Each is
> 	strcpy(base, "xxxxx");
> and base most certainly is used., though I can see how gcc might not
> notice if it is being too clever. Maybe you need to get gcc-4.1.2?
> or
>    make CWFLAGS=-Wall

Holger Kiehl was right, it complained about the unused return value.
Please see the attached patch.

Thomas

[-- Attachment #2: mdadm-warning-fix.patch --]
[-- Type: text/x-diff, Size: 2473 bytes --]

diff -u -r -p mdadm-2.6.2/Detail.c mdadm.warning/Detail.c
--- mdadm-2.6.2/Detail.c	Mon May 21 06:25:50 2007
+++ mdadm.warning/Detail.c	Wed May 30 10:52:32 2007
@@ -59,7 +59,7 @@ int Detail(char *dev, int brief, int exp
 	void *super = NULL;
 	int rv = test ? 4 : 1;
 	int avail_disks = 0;
-	char *avail;
+	char *avail = NULL;
 
 	if (fd < 0) {
 		fprintf(stderr, Name ": cannot open %s: %s\n",
diff -u -r -p mdadm-2.6.2/sysfs.c mdadm.warning/sysfs.c
--- mdadm-2.6.2/sysfs.c	Thu Dec 21 06:44:22 2006
+++ mdadm.warning/sysfs.c	Wed May 30 10:55:43 2007
@@ -94,7 +94,7 @@ struct sysarray *sysfs_read(int fd, int 
 
 	sra->devs = NULL;
 	if (options & GET_VERSION) {
-		strcpy(base, "metadata_version");
+		(void)strcpy(base, "metadata_version");
 		if (load_sys(fname, buf))
 			goto abort;
 		if (strncmp(buf, "none", 4) == 0)
@@ -104,19 +104,19 @@ struct sysarray *sysfs_read(int fd, int 
 			       &sra->major_version, &sra->minor_version);
 	}
 	if (options & GET_LEVEL) {
-		strcpy(base, "level");
+		(void)strcpy(base, "level");
 		if (load_sys(fname, buf))
 			goto abort;
 		sra->level = map_name(pers, buf);
 	}
 	if (options & GET_LAYOUT) {
-		strcpy(base, "layout");
+		(void)strcpy(base, "layout");
 		if (load_sys(fname, buf))
 			goto abort;
 		sra->layout = strtoul(buf, NULL, 0);
 	}
 	if (options & GET_COMPONENT) {
-		strcpy(base, "component_size");
+		(void)strcpy(base, "component_size");
 		if (load_sys(fname, buf))
 			goto abort;
 		sra->component_size = strtoull(buf, NULL, 0);
@@ -124,19 +124,19 @@ struct sysarray *sysfs_read(int fd, int 
 		sra->component_size *= 2;
 	}
 	if (options & GET_CHUNK) {
-		strcpy(base, "chunk_size");
+		(void)strcpy(base, "chunk_size");
 		if (load_sys(fname, buf))
 			goto abort;
 		sra->chunk = strtoul(buf, NULL, 0);
 	}
 	if (options & GET_CACHE) {
-		strcpy(base, "stripe_cache_size");
+		(void)strcpy(base, "stripe_cache_size");
 		if (load_sys(fname, buf))
 			goto abort;
 		sra->cache_size = strtoul(buf, NULL, 0);
 	}
 	if (options & GET_MISMATCH) {
-		strcpy(base, "mismatch_cnt");
+		(void)strcpy(base, "mismatch_cnt");
 		if (load_sys(fname, buf))
 			goto abort;
 		sra->mismatch_cnt = strtoul(buf, NULL, 0);
@@ -175,7 +175,7 @@ struct sysarray *sysfs_read(int fd, int 
 		dev->role = strtoul(buf, &ep, 10);
 		if (*ep) dev->role = -1;
 
-		strcpy(dbase, "block/dev");
+		(void)strcpy(dbase, "block/dev");
 		if (load_sys(fname, buf))
 			goto abort;
 		sscanf(buf, "%d:%d", &dev->major, &dev->minor);

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-05-30  9:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-21  4:55 ANNOUNCE: mdadm 2.6.2 - A tool for managing Soft RAID under Linux Neil Brown
2007-05-29 16:29 ` Thomas Jarosch
2007-05-29 20:49   ` Neil Brown
2007-05-30  6:23     ` Holger Kiehl
2007-05-30  9:43     ` Thomas Jarosch

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).