From owner-freebsd-current Mon Jun 19 0:15:34 2000 Delivered-To: freebsd-current@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 47CBD37BBFE for ; Mon, 19 Jun 2000 00:15:31 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id BAA74970; Mon, 19 Jun 2000 01:13:59 -0600 (MDT) (envelope-from ken) Date: Mon, 19 Jun 2000 01:13:59 -0600 From: "Kenneth D. Merry" To: "Brandon D. Valentine" Cc: Bob Bishop , Greg Lehey , FreeBSD current users Subject: Re: -e option to umount? Message-ID: <20000619011359.A74922@panzer.kdm.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: ; from bandix@looksharp.net on Mon, Jun 19, 2000 at 02:53:45AM -0400 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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