public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* libsas error-handling completion issue.
@ 2009-03-14  6:44 Ying Chu
  2009-03-14 17:19 ` James Bottomley
  0 siblings, 1 reply; 5+ messages in thread
From: Ying Chu @ 2009-03-14  6:44 UTC (permalink / raw)
  To: linux-scsi; +Cc: James.Bottomley, jeff, Tejun Heo

  
   As sas_eh_finish_cmd() routine is used when a sas task is marked
succfully recovered(or the device is marked OFFLINE), then the
corresponding task_done will be invoked after SAS_TASK_STATE_ABORTED is
unmasked. Whatever sas_scsi_task_done() or sas_ata_task_done() got
invoked, it will translate task_status to scsi_cmnd->request, free the
sas_task structure and invoke task_done, the problem is, after
task_done(), scsi_eh_finish_cmd() will still add the cmd to
sas_ha->eh_done_q, and in the coming scsi_eh_flush_done_q(), it will
retry the command or invoke scsi_finish_command() to finish the request
again.  

   Take a timeout SSP request in the race condition for example, if the
request is returned prior to lldd_abort_task() and set
SAS_TASK_STATE_DONE, the lldd_abort_task() handler will do nothing but
return TASK_IS_DONE in sas_scsi_find_task(), later sas_eh_finished_cmd()
will get invoked and unset SAS_TASK_STATE_ABORTED mask to let
sas_scsi_task_done() in, since it's a good response and the request will
be finished succfully.But current strategy will
add the scsi_cmnd to sas_ha->eh_done_q after task_done() is performed.
Then if possibe, we may scsi_queue_insert(scmd, SCSI_MLQUEUE_EH_RETRY)
in scsi_eh_flush_done_q(). I meet the condition and sometime the system
hangs.

   Did I miss something?
--
Regards,
Ying Chu

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

end of thread, other threads:[~2009-03-15 17:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-14  6:44 libsas error-handling completion issue Ying Chu
2009-03-14 17:19 ` James Bottomley
2009-03-15  4:02   ` Ying Chu
2009-03-15 14:14     ` James Bottomley
     [not found]       ` <FE3F06125A99254E8D92161AA4569C6F029F0621@sc-exch02.marvell.com>
2009-03-15 17:13         ` 答复: " James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox