From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 5 13:24:27 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 77F521065672; Tue, 5 Apr 2011 13:24:27 +0000 (UTC) (envelope-from borjam@sarenet.es) Received: from proxypop1b.sarenet.es (proxypop1b.sarenet.es [194.30.0.104]) by mx1.freebsd.org (Postfix) with ESMTP id 3952E8FC08; Tue, 5 Apr 2011 13:24:27 +0000 (UTC) Received: from [172.16.1.55] (ssglan.sare.net [192.148.167.100]) by proxypop1b.sarenet.es (Postfix) with ESMTP id CFF245CBF; Tue, 5 Apr 2011 15:24:25 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Borja Marcos In-Reply-To: <4D9B0DF7.8020104@FreeBSD.org> Date: Tue, 5 Apr 2011 15:24:25 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <4D0D7E78-2491-4D45-9DDE-58E360C6BA06@sarenet.es> References: <4D9AF9B7.9030107@FreeBSD.org> <4D9B0DF7.8020104@FreeBSD.org> To: Andriy Gapon X-Mailer: Apple Mail (2.1084) Cc: freebsd-scsi@FreeBSD.org Subject: Re: propose: change some sense codes handling 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: Tue, 05 Apr 2011 13:24:27 -0000 On Apr 5, 2011, at 2:41 PM, Andriy Gapon wrote: >>> Align handling of this condition with the rest of the conditions in = the same >>> family: "Power on occurred", "SCSI bus reset occurred", "Bus device = reset >>> function occurred", etc. >>> I don't see this particular condition should be special. >>> Any insights and/or historical reasons? >>=20 >> I would be cautious with this. Of course if it happened with no = outstanding operations and data committed to media, it should be = harmless. But if you power cycle a hard disk with a dirty cache, some of = the data won't be committed to disk. If you just retry the operation and = otherwise ignore the message (which is equivalent to just logging and = retrying) you keep writing data to a possibly corrupted medium. It can = certainly led to further corruption and make the problem worse. >>=20 >> My opinion, of course ;) >=20 > Sure :) > But why would this particular sense code be so different from other = similar codes > that I quoted above. I forgot. Of course it's not harmelss at all. That's the problem of = being multi-tasking ;) Reset or power on could indicate that any configuration written to the = device (mode pages) have gone back to the default values as well. So, = even with no outstanding operations, I would treat it with caution. And again, if you power cycle a device from which you have filesystems = attached I find it safer to treat it as an I/O error, unmounting the = filesystems, checking, etc, etc. Borja.