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

Roland Dreier rdreier at cisco.com
Mon May 8 09:57:08 PDT 2006


    Vu> Have you read scsi_eh_try_stu(scmnd) and scsi_eh_tur(scmnd)?
    Vu> These functions use the same scmnd and reformat it with new
    Vu> cdb and call srp_queuecommand() which uses new req and put
    Vu> this new req in request queue for this same scmnd with
    Vu> different cdb

Yes, but why are there any commands in the work_q at all?  In other
words, why is this loop entered at all?

 			list_for_each_entry_safe(scmd, next, work_q, eh_entry) {
 				if (!scsi_device_online(scmd->device) ||
 				    (!scsi_eh_try_stu(scmd) && !scsi_eh_tur(scmd)) ||
 				    !scsi_eh_tur(scmd))
 					scsi_eh_finish_cmd(scmd, done_q);
 			}

srp_reconnect_target() should get rid of all queued commands already:

	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);
	}

why does the midlayer have any commands around after that loop?

 - R.



More information about the general mailing list