NetBSD Problem Report #39583
From www@NetBSD.org Fri Sep 19 07:46:30 2008
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 09FA863B877
for <gnats-bugs@gnats.netbsd.org>; Fri, 19 Sep 2008 07:46:30 +0000 (UTC)
Message-Id: <20080919074629.7F74263B842@narn.NetBSD.org>
Date: Fri, 19 Sep 2008 07:46:29 +0000 (UTC)
From: bradd@cat.co.za
Reply-To: bradd@cat.co.za
To: gnats-bugs@NetBSD.org
Subject: acrmsr(4) driver doesn't report number of volumes correctly to bioctl(8)
X-Send-Pr-Version: www-1.0
>Number: 39583
>Category: kern
>Synopsis: acrmsr(4) driver doesn't report number of volumes correctly to bioctl(8)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Sep 19 07:50:01 +0000 2008
>Closed-Date: Wed Sep 24 14:15:26 +0000 2008
>Last-Modified: Wed Sep 24 17:30:04 +0000 2008
>Originator: Brad du Plessis
>Release: NetBSD 4.0_STABLE
>Organization:
Cathexis Technologies
>Environment:
NetBSD massstorage 4.0_STABLE NetBSD 4.0_STABLE (GENERIC.MP) #8: Thu Sep 18 16:46:11 SAST 2008 root@massstorage:/usr/src/sys/arch/i386/compile/GENERIC.MP i386
>Description:
I'm using an Areca ARC-1220:
arcmsr0 at pci2 dev 14 function 0: interrupting at ioapic0 pin 18 (irq 10)
arcmsr0: Areca ARC-1220 Host Adapter RAID controller
arcmsr0: 8 ports, 256MB SDRAM, firmware <V1.43 2007-4-17>
and I've created a single raid set with 3 volumes. My problem is that only the first volume is reported when doing a:
bioctl arcmsr0 show volumes
From looking at the source code in arcmsr.c, it appears that the total number of volumes reported to bioctl(8) will always be equal to the total number of raid sets. i.e. if I had 2 raid sets and 4 volumes a 'show volumes' would report the first 2 volumes.
>How-To-Repeat:
As above.
>Fix:
The following patch seems to address the problem, not sure if its the right thing to do:
Index: arcmsr.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/arcmsr.c,v
retrieving revision 1.9.4.3
diff -u -r1.9.4.3 arcmsr.c
--- arcmsr.c 29 Aug 2008 21:24:19 -0000 1.9.4.3
+++ arcmsr.c 19 Sep 2008 07:43:54 -0000
@@ -1189,8 +1189,7 @@
if (error != 0)
goto out;
- if (raidinfo->volumes)
- nvols++;
+ nvols+=raidinfo->volumes;
}
strlcpy(bi->bi_dev, device_xname(&sc->sc_dev), sizeof(bi->bi_dev));
>Release-Note:
>Audit-Trail:
From: "Juan Romero Pardines" <xtraeme@gmail.com>
To: "NetBSD GNATS" <gnats-bugs@netbsd.org>
Cc:
Subject: Re: kern/39583: acrmsr(4) driver doesn't report number of volumes correctly to bioctl(8)
Date: Mon, 22 Sep 2008 03:12:06 +0200
Hi,
this patch is ok. I think I didn't test your provided case when I added support
for this in past: one raid set and multiple volumes, so I did miss it.
Thanks.
From: Christos Zoulas <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/39583 CVS commit: src/sys/dev/pci
Date: Tue, 23 Sep 2008 22:22:41 +0000 (UTC)
Module Name: src
Committed By: christos
Date: Tue Sep 23 22:22:41 UTC 2008
Modified Files:
src/sys/dev/pci: arcmsr.c arcmsrvar.h
Log Message:
PR/39583: Brad du Plessis: acrmsr(4) driver doesn't report number of volumes correctly
to bioctl(8)
PR/39584: Juan RP: arcmsr(4) driver disk state values are incorrect (for ARC-1220)
To generate a diff of this commit:
cvs rdiff -r1.21 -r1.22 src/sys/dev/pci/arcmsr.c
cvs rdiff -r1.12 -r1.13 src/sys/dev/pci/arcmsrvar.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: christos@NetBSD.org
State-Changed-When: Wed, 24 Sep 2008 10:15:26 -0400
State-Changed-Why:
fixed thanks
From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/39583 CVS commit: [netbsd-4] src/sys/dev/pci
Date: Wed, 24 Sep 2008 17:25:23 +0000 (UTC)
Module Name: src
Committed By: bouyer
Date: Wed Sep 24 17:25:23 UTC 2008
Modified Files:
src/sys/dev/pci [netbsd-4]: arcmsr.c arcmsrvar.h
Log Message:
Pull up following revision(s) (requested by christos in ticket #1205):
sys/dev/pci/arcmsrvar.h: revision 1.13
sys/dev/pci/arcmsr.c: revision 1.22
PR/39583: Brad du Plessis: acrmsr(4) driver doesn't report number of
volumes correctly
to bioctl(8)
PR/39584: Juan RP: arcmsr(4) driver disk state values are incorrect (for
ARC-1220)
To generate a diff of this commit:
cvs rdiff -r1.9.4.3 -r1.9.4.4 src/sys/dev/pci/arcmsr.c
cvs rdiff -r1.8.4.3 -r1.8.4.4 src/sys/dev/pci/arcmsrvar.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.