From owner-freebsd-current@FreeBSD.ORG Tue Apr 5 20:59:16 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 59DD816A4CE for ; Tue, 5 Apr 2005 20:59:16 +0000 (GMT) Received: from critter.freebsd.dk (f170.freebsd.dk [212.242.86.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9968543D49 for ; Tue, 5 Apr 2005 20:59:15 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.3/8.13.1) with ESMTP id j35Kx8Xl002872; Tue, 5 Apr 2005 22:59:08 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: "Kevin Oberman" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 05 Apr 2005 13:18:20 PDT." <20050405201820.042685D07@ptavv.es.net> Date: Tue, 05 Apr 2005 22:59:08 +0200 Message-ID: <2871.1112734748@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: current@freebsd.org Subject: Re: Panic on mount with write-locked USB media (umass) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Apr 2005 20:59:16 -0000 In message <20050405201820.042685D07@ptavv.es.net>, "Kevin Oberman" writes: >> It would be useful if mount was smart enough to notice when it is >> dealing with a read-only device, and try to mount such things >> read-only, rather than trying to mount things read-write by default and >> failing. Of course, the system shouldn't panic, either. :-) > >I think that is what I said. I am almost sure that this is how it used >to work. I'm not sure whether the change was caused by something in >msdosfs or GEOM (or somewhere else), but I sure preferred it when the RO >device mounted RO. CDs still do this (thankfully). This makes me suspect >msdosfs is the culprit. There are two ways that a filesystem correctly could handle a R/O media: 1. Fail with EROFS unless asked t mouned read-only 2. Silently downgrade th emount to read-only. I personally prefer the first because that way a script does not have to check if it got the mount it wanted or not. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.