Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 Apr 2011 16:35:26 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Borja Marcos <borjam@sarenet.es>
Cc:        freebsd-scsi@FreeBSD.org
Subject:   Re: propose: change some sense codes handling
Message-ID:  <4D9B1A9E.4040007@FreeBSD.org>
In-Reply-To: <4D0D7E78-2491-4D45-9DDE-58E360C6BA06@sarenet.es>
References:  <4D9AF9B7.9030107@FreeBSD.org> <D10B0D62-E11E-445C-B9FA-DB4276F678B0@sarenet.es> <4D9B0DF7.8020104@FreeBSD.org> <4D0D7E78-2491-4D45-9DDE-58E360C6BA06@sarenet.es>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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