propose: change some sense codes handling
Borja Marcos
borjam at sarenet.es
Tue Apr 5 14:35:43 UTC 2011
On Apr 5, 2011, at 4:20 PM, Andriy Gapon wrote:
>>> 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?
>>
>> Seems to be safer to treat it as fatal, don't you think?
>
> Seems to be safe to treat everything as fatal, but less convenient perhaps?
> So let me clarify. Do you suggest that all "reset" and "power" statuses be
> treated as SS_FATAL? Or do you single-out "Power on, reset, or bus device reset
> occurred"?
Sorry to write in such broad terms, but I'm not that familiar with the source code of the SCSI subsystem. Hence the comments I'm writing are "high-level" in nature :) Anyway I hope they will be useful.
ASC/ASCQ codes belonging to the 0x29 range received during an operation different than an INQ done for a bus probe should be treated with care, I think. In case they affected to a device storing mounted filesystems, I think it should register as a fatal error. Ignoring it could lead to data corruption if the power cycle has happened before data has been committed to the disk (I'm talking about disks of course).
Doing this can lead to "spurious" errors with flaky devices, and maybe the operation would have succeeded. But, again, I think it's better to reveal the error rather than hiding it and risking data corruption. Moreover, if we make flaky devices work just right, we are favouring bad manufacturers. I remember a similar discussion on BUGTRAQ several years ago regarding a "MIME-polish program". My posture was that broken MIME should go to the trash period.
Regards ;)
Borja.
More information about the freebsd-scsi
mailing list