From owner-freebsd-arch@FreeBSD.ORG Mon Jan 14 17:00:56 2008 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6641416A41B; Mon, 14 Jan 2008 17:00:56 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from falcon.cybervisiontech.com (falcon.cybervisiontech.com [217.20.163.9]) by mx1.freebsd.org (Postfix) with ESMTP id 791DD13C455; Mon, 14 Jan 2008 17:00:50 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost (localhost [127.0.0.1]) by falcon.cybervisiontech.com (Postfix) with ESMTP id ED7AB744005; Mon, 14 Jan 2008 19:00:48 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at falcon.cybervisiontech.com Received: from falcon.cybervisiontech.com ([127.0.0.1]) by localhost (falcon.cybervisiontech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CtEGSZg7v83S; Mon, 14 Jan 2008 19:00:48 +0200 (EET) Received: from [10.2.1.87] (gateway.cybervisiontech.com.ua [88.81.251.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by falcon.cybervisiontech.com (Postfix) with ESMTP id 8351D744002; Mon, 14 Jan 2008 19:00:48 +0200 (EET) Message-ID: <478B953F.1070209@icyb.net.ua> Date: Mon, 14 Jan 2008 19:00:47 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.9 (X11/20071116) MIME-Version: 1.0 To: Alfred Perlstein References: <478B3EE0.8040908@icyb.net.ua> <7iir1wtp91.wl%gnn@neville-neil.com> <20080114160617.GN99258@elvis.mu.org> In-Reply-To: <20080114160617.GN99258@elvis.mu.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: gnn@freebsd.org, freebsd-arch@freebsd.org Subject: Re: cdcontrol purpose X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2008 17:00:56 -0000 on 14/01/2008 18:06 Alfred Perlstein said the following: > * gnn@freebsd.org [080114 07:11] wrote: >> At Mon, 14 Jan 2008 12:52:16 +0200, >> Andriy Gapon wrote: >>> >>> The following question may seem to be offtopic for this list, but I >>> think that it's not because it is related not only to cdcontrol utility >>> itself but also to the CD-ROM drivers. >>> >>> The question: should cdcontrol utility be able to eject a mounted disk >>> (i.e. a filesystem on the disk is mounted) ? >>> >> I come down on the side of "separation of concerns" and think that >> mount should deal with filesystems and that cdcontrol should not. This is how it is. The philosophical question is: if mount is able to prevent physical media of the fs from disappearing, should it employ that capability ? Currently, it does. > I agree. > > I can't tell if Andriy is suggesting that cdcontrol unmount the filesystem > forcefully or at least attempt to unmount it. > > I would say that it might make sense for cdcontrol to grow a flag > to "unmount non-forcefully if mounted", but certainly not to > unmount by default. > Well, I never suggested (or even had a thought) that cdcontrol should get into (un)mounting business, or even doing any checks. It is a simple tool and should stay simple. It boils down to the following: when you do mount a filesystem on CD/DVD (or otherwise open(2) cd/acd device) CD-ROM driver issues a command to lock a tray ("prevent"). I think that this is very reasonable as it prevents a user from accidentally ejecting (using a physical button, that is) and even replacing a disk while something has it in use. So I hope my question would be clearer now: should cdcontrol be allowed to override "prevent" issued by mount/open(2) and eject a disk in use ? Or should it simply fail in the same way that the physical button is disabled? -- Andriy Gapon