[8094] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Re: determining 'busy' status, and removing devices

daemon@ATHENA.MIT.EDU (Alan Cox)
Sat Feb 12 02:36:49 2000

To: mdharm-scsi@one-eyed-alien.net (Matthew Dharm)
Date:   Sat, 12 Feb 2000 01:40:59 +0000 (GMT)
Cc: linux-scsi@vger.rutgers.edu (The Linux SCSI list)
In-Reply-To: <Pine.LNX.4.10.10002111506310.10667-100000@ziggy.one-eyed-alien.net> from "Matthew Dharm" at Feb 11, 2000 03:08:53 PM
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <E12JRYT-00018T-00@the-village.bc.nu>
From: Alan Cox <alan@lxorguk.ukuu.org.uk>

> (o) How do I determine if a device is 'busy'?  That is, if it's mounted or
>     otherwise being accessed?

A device or a controller. Devices you need to check by their type but
the scsi code keeps usage counts 

	rscsi_device[target].access_count

etc

> (o) How well does the code to handle adding and removing SCSI devices
>     work?  I know it's possible to add hosts easily (which is the current
>     strategy), but what about removing hosts?  Removing devices?  What are
>     the constraints on these operations?

Removing them is trickier but is supported. You can either make them 
'unavailable' by setting rscsi_disks[target].device = 1 or doing a bus scan
from a user context. The bus rescan via /proc is supported by several
controllers by user operations so should work by kernel triggering


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu

home help back first fref pref prev next nref lref last post