Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jun 2000 01:13:59 -0600
From:      "Kenneth D. Merry" <ken@kdm.org>
To:        "Brandon D. Valentine" <bandix@looksharp.net>
Cc:        Bob Bishop <rb@gid.co.uk>, Greg Lehey <grog@sydney.worldwide.lemis.com>, FreeBSD current users <FreeBSD-current@FreeBSD.ORG>
Subject:   Re: -e option to umount?
Message-ID:  <20000619011359.A74922@panzer.kdm.org>
In-Reply-To: <Pine.BSF.4.21.0006190248060.1282-100000@turtle.looksharp.net>; from bandix@looksharp.net on Mon, Jun 19, 2000 at 02:53:45AM -0400
References:  <l03130303b5736ae04e63@[194.32.164.2]> <Pine.BSF.4.21.0006190248060.1282-100000@turtle.looksharp.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 19, 2000 at 02:53:45 -0400, Brandon D. Valentine wrote:
> On Mon, 19 Jun 2000, Bob Bishop wrote:
> 
> >What's special about mounted devices? I'd prefer to see an eject command
> >which attempts to unmount the device if it's mounted.
> 
> What'd be really spiffy is if when I hit the eject button on my CDROM
> drive that whatever scsi signal that event generates, was intercepted by
> the kernel and, provided the filesystem met the normal criteria for
> being umount'd(i.e. nothing accessing it), it would be umount'd and then
> ejected.  I know nothing about what happens when I hit the eject button
> on a CDROM drive.  Anyone care to speculate on if that's a reasonable
> thing to implement?

That's a cool idea, but unfortunately, it won't work with any hardware I
know of.

In order for that to work, the CDROM drive would have to generate an AEN
(Asynchronous Event Notification) and send it to the controller, which
would have to be capable of functioning as a target as well as an
initiator.

Then the controller would have to pass that back up to some process that
would then unmount the drive, which would also give the cd(4) driver its
final close and allow removal of the media.

Then the eject could proceed.

The problem is that I haven't yet seen a SCSI device (well, short of a
FreeBSD box) that is capable of doing AENs, since most SCSI devices can't
be both target and initiator.  They're generally just targets.

Likewise, most controllers only function as initiators.  The Adaptec
and Qlogic controllers are exceptions in FreeBSD.  The Symbios/LSI
controllers could probably do target mode as well, given the right firmware
and driver support.

Ken
-- 
Kenneth Merry
ken@kdm.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000619011359.A74922>