propose: change some sense codes handling
Borja Marcos
borjam at sarenet.es
Tue Apr 5 13:24:27 UTC 2011
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.
Borja.
More information about the freebsd-scsi
mailing list