From owner-freebsd-scsi@FreeBSD.ORG Fri Apr 8 15:23:43 2011 Return-Path: Delivered-To: freebsd-scsi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BF8E106567D; Fri, 8 Apr 2011 15:23:43 +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 D9CB08FC16; Fri, 8 Apr 2011 15:23:41 +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 SAA07973; Fri, 08 Apr 2011 18:23:24 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4D9F286B.4010102@FreeBSD.org> Date: Fri, 08 Apr 2011 18:23:23 +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: Andrew Duane References: <4D9DF375.4080506@FreeBSD.org> <20110408000025.GA16252@icarus.home.lan> <4D9EF55C.5070300@FreeBSD.org> <20110408214920.I1265@besplex.bde.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 , freebsd-scsi@FreeBSD.org Subject: Re: retry mounting with ro when rw fails X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2011 15:23:43 -0000 on 08/04/2011 15:36 Andrew Duane said the following: > What I was hoping to do was design a better mechanism for passing that R/O > detection from the device to the filesystem code. Our implementation uses a > platform sysctl that checks the incoming device name against some hardware or > software settings. Ick. I don't know enough about device/GEOM calls to do it > better though. I am actually not aware of any way to inquiry write-protection status from hardware. There are distinct SCSI sense codes for that, but you get them only after a failed write attempt. But there are many things that I don't know about... -- Andriy Gapon