From owner-freebsd-fs@FreeBSD.ORG Fri Apr 8 12:11:06 2011 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 250A61065674; Fri, 8 Apr 2011 12:11:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 37B2B8FC15; Fri, 8 Apr 2011 12:11:04 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA05618; Fri, 08 Apr 2011 15:11:01 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4D9EFB55.1000706@FreeBSD.org> Date: Fri, 08 Apr 2011 15:11:01 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110309 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: Garrett Cooper References: <4D9DF375.4080506@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.org, FreeBSD Hackers Subject: Re: retry mounting with ro when rw fails X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2011 12:11:06 -0000 on 07/04/2011 23:20 Garrett Cooper said the following: > > As a generic question / observation, maybe we should just > implement 'errors=remount-ro' (or a reasonable facsimile) like Linux > has in our mount(8) command? Doesn't look like NetBSD, OpenBSD, or > [Open]Solaris sported similar functionality. No problem, I am OK with being first. Then, I only want to deal with media that is "semi-permanently" or permanetly read-only. That's why I handle only failure to mount media as R/W. But from what I read 'errors=remount-ro' in Linux has to do with errors that happen after filesystem is mounted. That is, you mounted a filesystem, you work with it, you get some error (e.g. because of bad blocks), you auto-downgrade the filesystem to readonly. This may be a nice feature, but this is something different from what I proposed. And, AFAIK, Linux does what I propose by default, without any additional options. Google for "block device ... is write-protected, mounting read-only". But yes, it seems that they handle this situation entirely in userland. And I am not against it. -- Andriy Gapon