NetBSD Problem Report #8189

Received: (qmail 993 invoked from network); 11 Aug 1999 06:50:18 -0000
Message-Id: <199908110648.BAA25647@linkdead.paranoia.com>
Date: Wed, 11 Aug 1999 01:48:34 -0500 (CDT)
From: VaX#n8 <vax@linkdead.paranoia.com>
Reply-To: vax@linkdead.paranoia.com
To: gnats-bugs@gnats.netbsd.org
Subject: disklabel(8) and disktab(5) disagree on seek time units
X-Send-Pr-Version: 3.95

>Number:         8189
>Category:       bin
>Synopsis:       disklabel says milliseconds, disktab says micro
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 11 00:05:00 +0000 1999
>Closed-Date:    Mon Dec 20 18:19:28 +0000 1999
>Last-Modified:  Mon Dec 20 18:19:52 +0000 1999
>Originator:     VaX#n8
>Release:        1.3+
>Organization:

>Environment:


>Description:
disklabel annotates its output with a handy "milliseconds" which appears to
be in conflict with disklabel.h and disktab(5).
>How-To-Repeat:
vax@linkdead 3 bash$ disklabel sd0 | grep milli
headswitch: 0           # milliseconds
track-to-track seek: 1300       # milliseconds
$ grep usec /usr/include/sys/disklabel.h 
        u_int32_t d_headswitch;         /* head switch time, usec */
        u_int32_t d_trkseek;            /* track-to-track seek, usec */
$ grep usec /usr/share/man/cat8/diskl
disklabel.0  diskless.0   
$ grep usec /usr/share/man/cat8/diskl
disklabel.0  diskless.0   
$ grep usec /usr/share/man/cat5/disktab.0 
     hs        num      Headswitch time, usec, default 0
     ts        num      One-cylinder seek time, usec, default 0

>Fix:
Change this, if it should be "microseconds".
disklabel.c:
        (void) fprintf(f, "headswitch: %ld\t\t# milliseconds\n",
                (long) lp->d_headswitch);
        (void) fprintf(f, "track-to-track seek: %ld\t# milliseconds\n",
                (long) lp->d_trkseek);

If it should really be "milliseconds", consider the silliness of this
unit for measuring a single-track seek.

(For fun, I computed that to overflow this counter, if it were measured
in milliseconds, a drive would have a track-to-track seek of 2147483.648
seconds, or 24.8551348148 days.  Assuming linear scaling, 2000 cylinders,
and neglecting head settle time, such a drive might have an average seek
time of about 68 years.  Actually ths disklabel info calls it unsigned,
so you can effectively double that.  Now that's what I call engineering!)
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: fair 
State-Changed-When: Mon Dec 20 10:19:28 PST 1999 
State-Changed-Why:  
disklabel patched. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.