*BSD News Article 35744


Return to BSD News archive

Xref: sserve comp.os.386bsd.questions:13104 comp.os.386bsd.development:2548
Newsgroups: comp.os.386bsd.questions,comp.os.386bsd.development
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!spool.mu.edu!agate!tfs.com!julian
From: julian@tfs.com (Julian Elischer)
Subject: Re: scsi_start_unit() in sd.c
Message-ID: <Cw1GGp.4G1@tfs.com>
Organization: TRW Financial Systems, Oakland, CA
References: <352dqf$t25@ipgaix.unipg.it>
Date: Mon, 12 Sep 1994 22:43:37 GMT
Lines: 40

In article <352dqf$t25@ipgaix.unipg.it>,
G. Vitillaro <peppe@ipgaix.unipg.it> wrote:
>I'm using FreeBSD 1.1.5.1 with an Adaptec 1542b and
>an IBM 0663L12 1Gb hard disk.
>
[...]
>        scsi_start_unit(sc_link, SCSI_ERR_OK | SCSI_SILENT);
[....]
>
>
>(1) What risks I'm taking working this way, supposing
>    I'll never have disks that may be turned off after the
>    boot?
no risk, but some people's disks (especially DEC drives start up
in the 'powered down' configuration.. (often it's a jumpered
option but not everyone has the docs for their drive)

>
>(2) Is it not possible to ask to the SCSI device if
>    it was already started and only in the negative case
>    call scsi_start_unit()?
>
not really, though we really only need to do it once. not on every open..
(but how many times do you open a disk?
(once you mount it it stays open)

it could be associated with the flag in the sd_data structure that indicates
that we have valid data on the drive.. as long as the data is valid, we'd assume
it's running. I've been considering adding code to spin down a disk that's not been
accessed in a while (as an option)

julian
+----------------------------------+       ______ _  __
|   __--_|\  Julian Elischer       |       \     U \/ / On assignment
|  /       \ julian@tfs.com        +------>x   USA    \ in a very strange
| (   OZ    ) 300 lakeside Dr. oakland CA. \___   ___ | country !
+- X_.---._/  USA+(510) 645-3137(wk)           \_/   \\            
          v