On Thu, 6 June 2013 22:39:14 +0200, Hannes Reinecke wrote:
> 
> >>+           spin_unlock_irqrestore(&sdev->list_lock, flags);
> >>+           SCSI_LOG_ERROR_RECOVERY(3,
> >>+                   scmd_printk(KERN_INFO, scmd,
> >>+                               "aborting command %p\n", scmd));
> >>+           rtn = scsi_try_to_abort_cmd(shost->hostt, scmd);
> >>+           if (rtn == SUCCESS || rtn == FAST_IO_FAIL) {
> >>+                   if (((scmd->request->cmd_flags & REQ_FAILFAST_DEV) ||
> >
> >Am I being stupid again or should this be negated?
> >
> Knowing you I would think the former; where do you see the negation?

If REQ_FAILFAST_DEV is set, this runs scsi_queue_insert(), which I
would expect it should run scsi_finish_command().

> >>+                        (scmd->request->cmd_type == REQ_TYPE_BLOCK_PC)) &&
> >>+                       (++scmd->retries <= scmd->allowed)) {
> >>+                           SCSI_LOG_ERROR_RECOVERY(3,
> >>+                                   scmd_printk(KERN_WARNING, scmd,
> >>+                                               "retry aborted command\n"));
> >>+
> >>+                           scsi_queue_insert(scmd, SCSI_MLQUEUE_EH_RETRY);
> >>+                   } else {
> >>+                           SCSI_LOG_ERROR_RECOVERY(3,
> >>+                                   scmd_printk(KERN_WARNING, scmd,
> >>+                                               "fast fail aborted 
> >>command\n"));
> >>+                           scmd->result |= DID_TRANSPORT_FAILFAST << 16;
> >>+                           scsi_finish_command(scmd);
> >>+                   }
> >>+           } else {
> >>+                   if (!scsi_eh_scmd_add(scmd, 0)) {
> >>+                           SCSI_LOG_ERROR_RECOVERY(3,
> >>+                                   scmd_printk(KERN_WARNING, scmd,
> >>+                                               "terminate aborted 
> >>command\n"));
> >>+                           scmd->result |= DID_TIME_OUT << 16;
> >>+                           scsi_finish_command(scmd);
> >>+                   }
> >>+           }
> >>+           spin_lock_irqsave(&sdev->list_lock, flags);
> >>+   }
> >>+   spin_unlock_irqrestore(&sdev->list_lock, flags);
...
> >>@@ -231,6 +231,7 @@ static struct scsi_device *scsi_alloc_sdev(struct 
> >>scsi_target *starget,
> >>    struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
> >>    extern void scsi_evt_thread(struct work_struct *work);
> >>    extern void scsi_requeue_run_queue(struct work_struct *work);
> >>+   extern void scsi_eh_abort_handler(struct work_struct *work);
> >
> >Function declarations in a .c file?  Ick!
> >
> Sing-along: We didn't start the fire, it always burning ...
> 
> I'm just following precedents here.

Fair enough.

Jörn

--
The cost of changing business rules is much more expensive for software
than for a secretary.
-- unknown
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to