[openib-general][patch review] srp: fmr implementation,

Roland Dreier rdreier at cisco.com
Sat May 6 08:01:14 PDT 2006


 > 1st scsi_try_host_reset() --> srp_host_reset() -->
 > srp_reconnect_target() return SUCCESS. Then scsi_eh_try_stu() or
 > scsi_eh_tur() is called right after
 > 
 > scsi_eh_try_stu or scsi_eh_tur --> scsi_send_eh_cmnd() -->
 > srp_queuecommand()

But after srp_reconnect_target(), both SRP's and the midlayer's queue
of pending commands should be completely empty, since I put

	list_for_each_entry(req, &target->req_queue, list) {
		req->scmnd->result = DID_RESET << 16;
		req->scmnd->scsi_done(req->scmnd);
		srp_unmap_data(req->scmnd, target, req);
	}

and

	INIT_LIST_HEAD(&target->free_reqs);
	INIT_LIST_HEAD(&target->req_queue);
	for (i = 0; i < SRP_SQ_SIZE; ++i)
		list_add_tail(&target->req_ring[i].list, &target->free_reqs);

in there.  Why doesn't that work to kill all the pending commands?

 - R.



More information about the general mailing list