Subject: Re: detaching SCSI devices
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Chris G. Demetriou <email@example.com>
Date: 07/08/1999 15:44:37
der Mouse <mouse@Rodents.Montreal.QC.CA> writes:
> As for how, well, it's pretty simple unless I missed something. The
> meat of it is in scsiconf.c. It does occur to me that config_detach
> should take more care with FSTATE_STAR devices; it should be possible
> to free up more than just the last-used unit, so that if you have
> sd0-sd5 and dettach (in order) sd3, sd4, sd5, then it reclaims all
> three units. Doing this right would be a little interesting, but
> shouldn't be too bad....
Actually, as far as i'm concerned, the "right thing" to do here is
jsut keep the # of the first unit to be allocated to cloning
(FSTATE_STAR) devices, then just search for a free slot.
simple, stupid, and it doesn't have to be particularly efficient, so
there's no point in going to a bunch of trouble optimizing it.
Chris Demetriou - firstname.lastname@example.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.