Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Apr 2011 12:45:23 -0400
From:      Andrew Duane <aduane@juniper.net>
To:        Andriy Gapon <avg@FreeBSD.org>
Cc:        "freebsd-fs@freebsd.org" <freebsd-fs@FreeBSD.org>, FreeBSD Hackers <freebsd-hackers@FreeBSD.org>, "freebsd-scsi@FreeBSD.org" <freebsd-scsi@FreeBSD.org>
Subject:   RE: retry mounting with ro when rw fails
Message-ID:  <AC6674AB7BC78549BB231821ABF7A9AEB52FD949F6@EMBX01-WF.jnpr.net>
In-Reply-To: <4D9F286B.4010102@FreeBSD.org>
References:  <4D9DF375.4080506@FreeBSD.org> <BANLkTimAyh4-T0gQ1cuQn0nm8m7SHwW5iA@mail.gmail.com> <20110408000025.GA16252@icarus.home.lan> <4D9EF55C.5070300@FreeBSD.org> <20110408214920.I1265@besplex.bde.org> <AC6674AB7BC78549BB231821ABF7A9AEB52FD945A8@EMBX01-WF.jnpr.net> <4D9F286B.4010102@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
For SCSI-attached disks, yes. But other hardware has write-protect sensing =
(SD cards, CD-roms, our platform). So if you can do that, you should

Cleaning up after a failed write is a real problem, one that I needed to av=
oid.=20


/Andrew
=20

-----Original Message-----
From: Andriy Gapon [mailto:avg@FreeBSD.org]=20
Sent: Friday, April 08, 2011 11:23 AM
To: Andrew Duane
Cc: Bruce Evans; freebsd-fs@freebsd.org; FreeBSD Hackers; freebsd-scsi@Free=
BSD.org
Subject: Re: retry mounting with ro when rw fails

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 hardwar=
e 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 o=
nly
after a failed write attempt.

But there are many things that I don't know about...

--=20
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AC6674AB7BC78549BB231821ABF7A9AEB52FD949F6>