From nobody@FreeBSD.org  Thu May 26 11:52:23 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 4A1A216A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 26 May 2005 11:52:23 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7AE7C43D93
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 26 May 2005 11:52:17 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j4QBqFqu082236
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 26 May 2005 11:52:15 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j4QBqFEV082234;
	Thu, 26 May 2005 11:52:15 GMT
	(envelope-from nobody)
Message-Id: <200505261152.j4QBqFEV082234@www.freebsd.org>
Date: Thu, 26 May 2005 11:52:15 GMT
From: Andriy Gapon <avg@icyb.net.ua>
To: freebsd-gnats-submit@FreeBSD.org
Subject: acd (atapicd) device lacks devstat
X-Send-Pr-Version: www-2.3

>Number:         81496
>Category:       kern
>Synopsis:       acd (atapicd) device lacks devstat
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    linimon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 26 12:00:06 GMT 2005
>Closed-Date:    Mon Jul 30 09:55:16 GMT 2007
>Last-Modified:  Mon Jul 30 09:55:16 GMT 2007
>Originator:     Andriy Gapon
>Release:        5.4-RELEASE
>Organization:
>Environment:
5.4-RELEASE i386
6.0-CURRENT i386
  
>Description:
acd device does not register itself as a geom disk with create_disk()
Soeren said a long while ago that there are some reasons for that:
http://www.mail-archive.com/freebsd-current@freebsd.org/msg33834.html

I am not sure how valid those reasons are, because cd device is a geom
disk and it essentially implements very similar interface although for a
different bus.

I don't want to venture further in acd vs. geom disk situation, but not
being a geom disk acd doesn't have get automatic devstat bookkeeping
(as cd, ad etc do). It doesn't have any devstat bookkeeping of its own too.

>How-To-Repeat:
On a system with ATAPI CDROM and atapicd device in kernel do the following:

1. sysctl kern.disks - acd* won't show up in the list returned
2. iostat -d - acd* won't be there
3. inspect atapi-cd.c sources
>Fix:
sorry, no patch at this time
>Release-Note:
>Audit-Trail:

From: "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To: Andriy Gapon <avg@icyb.net.ua>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/81496: acd (atapicd) device lacks devstat 
Date: Thu, 26 May 2005 17:31:00 +0200

 In message <200505261152.j4QBqFEV082234@www.freebsd.org>, Andriy Gapon writes:
 
 
 Use the gstat(8) program instead.
 
 -- 
 Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
 phk@FreeBSD.ORG         | TCP/IP since RFC 956
 FreeBSD committer       | BSD since 4.3-tahoe    
 Never attribute to malice what can adequately be explained by incompetence.

From: Andriy Gapon <avg@icyb.net.ua>
To: Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/81496: acd (atapicd) device lacks devstat
Date: Thu, 26 May 2005 18:53:57 +0300

 on 26.05.2005 18:31 Poul-Henning Kamp said the following:
 > In message <200505261152.j4QBqFEV082234@www.freebsd.org>, Andriy Gapon writes:
 > 
 > 
 > Use the gstat(8) program instead.
 > 
 
 Poul-Henning,
 
 here's an output from gstat while copying a file from a UDF filesystem
 on acd0 to a filesystem on ad0s1f (5.4-release, atapicam is present in
 the kernel):
 
 dT: 0.501  flag_I 500000us  sizeof 240  i -1
  L(q)  ops/s    r/s   kBps   ms/r    w/s   kBps   ms/w   %busy Name
     0     22      0      0    0.0     22   2811    1.5    3.3| ad0
     0     22      0      0    0.0     22   2811    1.5    3.3| ad0s1
     0      0      0      0    0.0      0      0    0.0    0.0| acd0
     0      0      0      0    0.0      0      0    0.0    0.0| acd0t01
     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1a
     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1b
     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1c
     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1d
     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1e
     0     22      0      0    0.0     22   2811    1.5    3.4| ad0s1f
     0      0      0      0    0.0      0      0    0.0    0.0| acd1
     1     44     44   2811   22.5      0      0    0.0   99.1| cd0
     0      0      0      0    0.0      0      0    0.0    0.0| acd1t01
     0      0      0      0    0.0      0      0    0.0    0.0| cd1
 
 
 I am not sure why acd0 got all zeros.
 
 Anyway, even if gstat should work perfectly for acd, I think it is no
 reason to have iostat/systat incomplete. Also, a reference to gstat(8)
 in iostat(8) and systat(1) would be nice too.
 
 Btw, is it a bug or a feature that gstat requires root privileges ? -
 iostat/systat can be run as a regualr user:
 gstat: geom_stats_open(): Permission denied
 
 -- 
 Andriy Gapon

From: "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To: Andriy Gapon <avg@icyb.net.ua>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/81496: acd (atapicd) device lacks devstat 
Date: Thu, 26 May 2005 18:09:25 +0200

 In message <4295F115.4050301@icyb.net.ua>, Andriy Gapon writes:
 >on 26.05.2005 18:31 Poul-Henning Kamp said the following:
 >> In message <200505261152.j4QBqFEV082234@www.freebsd.org>, Andriy Gapon writes:
 >> 
 >> 
 >> Use the gstat(8) program instead.
 >> 
 >
 >Poul-Henning,
 >
 >here's an output from gstat while copying a file from a UDF filesystem
 >on acd0 to a filesystem on ad0s1f (5.4-release, atapicam is present in
 >the kernel):
 >
 >dT: 0.501  flag_I 500000us  sizeof 240  i -1
 > L(q)  ops/s    r/s   kBps   ms/r    w/s   kBps   ms/w   %busy Name
 >    0     22      0      0    0.0     22   2811    1.5    3.3| ad0
 >    0     22      0      0    0.0     22   2811    1.5    3.3| ad0s1
 >    0      0      0      0    0.0      0      0    0.0    0.0| acd0
 >    0      0      0      0    0.0      0      0    0.0    0.0| acd0t01
 >    0      0      0      0    0.0      0      0    0.0    0.0| ad0s1a
 >    0      0      0      0    0.0      0      0    0.0    0.0| ad0s1b
 >    0      0      0      0    0.0      0      0    0.0    0.0| ad0s1c
 >    0      0      0      0    0.0      0      0    0.0    0.0| ad0s1d
 >    0      0      0      0    0.0      0      0    0.0    0.0| ad0s1e
 >    0     22      0      0    0.0     22   2811    1.5    3.4| ad0s1f
 >    0      0      0      0    0.0      0      0    0.0    0.0| acd1
 >    1     44     44   2811   22.5      0      0    0.0   99.1| cd0
 >    0      0      0      0    0.0      0      0    0.0    0.0| acd1t01
 >    0      0      0      0    0.0      0      0    0.0    0.0| cd1
 >
 >
 >I am not sure why acd0 got all zeros.
 
 Because you use atapi-cam and /dev/cd0 ?
 
 >Anyway, even if gstat should work perfectly for acd, I think it is no
 >reason to have iostat/systat incomplete. Also, a reference to gstat(8)
 >in iostat(8) and systat(1) would be nice too.
 
 Yeah, I think it is point 1032 on my todo list :-(
 
 >Btw, is it a bug or a feature that gstat requires root privileges ? -
 >iostat/systat can be run as a regualr user:
 >gstat: geom_stats_open(): Permission denied
 
 That's probably a bug.
 
 -- 
 Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
 phk@FreeBSD.ORG         | TCP/IP since RFC 956
 FreeBSD committer       | BSD since 4.3-tahoe    
 Never attribute to malice what can adequately be explained by incompetence.

From: Andriy Gapon <avg@icyb.net.ua>
To: Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/81496: acd (atapicd) device lacks devstat
Date: Thu, 26 May 2005 20:20:22 +0300

 on 26.05.2005 19:09 Poul-Henning Kamp said the following:
 > In message <4295F115.4050301@icyb.net.ua>, Andriy Gapon writes:
 >>on 26.05.2005 18:31 Poul-Henning Kamp said the following:
 >>>In message <200505261152.j4QBqFEV082234@www.freebsd.org>, Andriy Gapon writes:
 >>I am not sure why acd0 got all zeros.
 > 
 > Because you use atapi-cam and /dev/cd0 ?
 
 you are correct, it was my bad - I mounted cd0 instead of acd0.
 Now everything is reported correcly.
 Thank you very much for introducing gstat to me.
 
 >>Anyway, even if gstat should work perfectly for acd, I think it is no
 >>reason to have iostat/systat incomplete. Also, a reference to gstat(8)
 >>in iostat(8) and systat(1) would be nice too.
 > 
 > Yeah, I think it is point 1032 on my todo list :-(
 
 I hope you were talking just about man pages, not iostat/systat
 utilities themselves.
 
 
 -- 
 Andriy Gapon
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Wed Jun 27 06:36:38 UTC 2007 
State-Changed-Why:  
Did the workaround of using gstat that phk suggested fix this problem? 


Responsible-Changed-From-To: freebsd-bugs->linimon 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Jun 27 06:36:38 UTC 2007 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=81496 
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Mon Jul 30 09:54:42 UTC 2007 
State-Changed-Why:  
Feedback timeout (> 1 month).  The problem is believed to be fixed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=81496 
>Unformatted:
