Re: [PATCH v1 10/13] IB/iser: Support T10-PI operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/4/2014 6:16 PM, Or Gerlitz wrote:
On 04/03/2014 16:44, Sagi Grimberg wrote:
@@ -1707,10 +1707,17 @@ int iscsi_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc)
                                goto prepd_fault;
                        }
                }
-               if (session->tt->xmit_task(task)) {
-                       session->cmdsn--;
-                       reason = FAILURE_SESSION_NOT_READY;
-                       goto prepd_reject;
+
+               reason = session->tt->xmit_task(task);
+               if (reason) {
+                       if (reason == -ENOMEM || reason == -EAGAIN) {
+                               session->cmdsn--;

I am pretty sure this has to be done anyway, no matter why the xmit_task callback failed

Even if we abort? this just follows the same logic as iscsi_prep_scsi_cmd_pdu error flow.

yes, take a 2nd look on iscsi_prep_scsi_cmd_pdu and you'll see that all the possible error cases take place **before** session->cmdsn is incremented

Ahhh, yes... So dec the cmdsn regardless.

Mike, are you on board with this?

Sagi.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux