diff options
author | Niklas Cassel <cassel@kernel.org> | 2024-08-28 09:27:04 +0200 |
---|---|---|
committer | Damien Le Moal <dlemoal@kernel.org> | 2024-08-29 10:06:11 +0900 |
commit | 9526dec226f0779d72f798e7a18375bf8d414775 (patch) | |
tree | 97bfadd80a59214718c44c36198420aa589893be /tools/perf/scripts/python/task-analyzer.py | |
parent | 43d37fffda9b7ad10ae90122ea532a829bdd2f92 (diff) |
ata: libata: Add helper ata_eh_decide_disposition()
Every time I see libata code calling scsi_check_sense(), I get confused
why the code path that is working fine for SCSI code, is not sufficient
for libata code.
The reason is that SCSI usually gets the sense data as part of the
completion, and will thus automatically call scsi_check_sense(), which
will set the SCSI ML byte (if any).
However, for libata queued commands, we always need to fetch the sense
data via SCSI EH, and thus do not get the luxury of having
scsi_check_sense() called automatically.
Add a new helper, ata_eh_decide_disposition(), that has a ata_eh_ prefix
to more clearly highlight that this is only needed for code called by EH,
while also having a similar name to scsi_decide_disposition(), such that
it is easier to compare the libata code with the equivalent SCSI code.
Also add a big kdoc comment explaining why this helper is called/needed in
the first place.
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions