All of lore.kernel.org
 help / color / mirror / Atom feed
* Why are DID_ABORT and TASK_ABORTED handled differently?
@ 2012-07-12 16:49 Paolo Bonzini
  2012-07-12 17:09 ` James Bottomley
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2012-07-12 16:49 UTC (permalink / raw)
  To: linux-scsi

Currently, DID_ABORT relays the failure to the upper layer, while TASK
ABORTED (after the suggestion at
http://marc.info/?l=linux-scsi&m=121932916906009&w=2 was implemented)
retries the command.

Is it correct that when TAS=0 an aborted task (from TMF, persistent
reservation or anything else) can result in DID_ABORT?  There are some
clues of this in the drivers, but on the other hand scsi-debug has a
very strange usage of DID_ABORT:

static const int illegal_condition_result =
        (DRIVER_SENSE << 24) | (DID_ABORT << 16) |
        SAM_STAT_CHECK_CONDITION;

...
        /* DIX + T10 DIF */
        if (scsi_debug_dix && scsi_prot_sg_count(SCpnt)) {
                int prot_ret = prot_verify_read(SCpnt, lba, num, ei_lba);

                if (prot_ret) {
                        mk_sense_buffer(devip, ABORTED_COMMAND, 0x10,
prot_ret);
                        return illegal_condition_result;
                }
        }


If it is the case that they are similar, is there any reason why the two
are handled differently?

Paolo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-12 17:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-12 16:49 Why are DID_ABORT and TASK_ABORTED handled differently? Paolo Bonzini
2012-07-12 17:09 ` James Bottomley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.