From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 5 13:35:31 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 1A514106564A for ; Tue, 5 Apr 2011 13:35:31 +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 625178FC08 for ; Tue, 5 Apr 2011 13:35:29 +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 QAA04632; Tue, 05 Apr 2011 16:35:27 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4D9B1A9E.4040007@FreeBSD.org> Date: Tue, 05 Apr 2011 16:35:26 +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: Borja Marcos References: <4D9AF9B7.9030107@FreeBSD.org> <4D9B0DF7.8020104@FreeBSD.org> <4D0D7E78-2491-4D45-9DDE-58E360C6BA06@sarenet.es> In-Reply-To: <4D0D7E78-2491-4D45-9DDE-58E360C6BA06@sarenet.es> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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:35:31 -0000 on 05/04/2011 16:24 Borja Marcos said the following: > > 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? >>> >>> 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. >>> >>> My opinion, of course ;) >> >> 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. Sure. So, still why "Power on occurred" or "Device internal reset" should be SS_RDEF while "Power on, reset, or bus device reset occurred" should be SS_FATAL? -- Andriy Gapon