Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3104a2175dc04b7a597acea90f19b033abcfc7d8
Commit:     3104a2175dc04b7a597acea90f19b033abcfc7d8
Parent:     0264d8853137a9a328d9f0ed29e083dd505512cb
Author:     Erez Zilber <[EMAIL PROTECTED]>
AuthorDate: Sun Mar 25 12:07:10 2007 +0200
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Mon Mar 26 16:35:09 2007 -0700

    IB/iser: Handle aborting a command after it is sent
    
    The SCSI midlayer may abort a command that was already sent.  If the
    initiator is still trying to send the command (or data-out PDUs for
    that command), the QP may time out after the midlayer times
    out. Therefore, when aborting the command, iSER may still have
    references for the command's buffers.  When sending these PDUs, the
    sends will complete with an error and their resources will be released
    then.
    
    Signed-off-by: Erez Zilber <[EMAIL PROTECTED]>
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 drivers/infiniband/ulp/iser/iser_initiator.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c 
b/drivers/infiniband/ulp/iser/iser_initiator.c
index 89e3728..278fcbc 100644
--- a/drivers/infiniband/ulp/iser/iser_initiator.c
+++ b/drivers/infiniband/ulp/iser/iser_initiator.c
@@ -658,6 +658,7 @@ void iser_ctask_rdma_finalize(struct iscsi_iser_cmd_task 
*iser_ctask)
 {
        int deferred;
        int is_rdma_aligned = 1;
+       struct iser_regd_buf *regd;
 
        /* if we were reading, copy back to unaligned sglist,
         * anyway dma_unmap and free the copy
@@ -672,20 +673,20 @@ void iser_ctask_rdma_finalize(struct iscsi_iser_cmd_task 
*iser_ctask)
        }
 
        if (iser_ctask->dir[ISER_DIR_IN]) {
-               deferred = iser_regd_buff_release
-                       (&iser_ctask->rdma_regd[ISER_DIR_IN]);
+               regd = &iser_ctask->rdma_regd[ISER_DIR_IN];
+               deferred = iser_regd_buff_release(regd);
                if (deferred) {
-                       iser_err("References remain for BUF-IN rdma reg\n");
-                       BUG();
+                       iser_err("%d references remain for BUF-IN rdma reg\n",
+                                atomic_read(&regd->ref_count));
                }
        }
 
        if (iser_ctask->dir[ISER_DIR_OUT]) {
-               deferred = iser_regd_buff_release
-                       (&iser_ctask->rdma_regd[ISER_DIR_OUT]);
+               regd = &iser_ctask->rdma_regd[ISER_DIR_OUT];
+               deferred = iser_regd_buff_release(regd);
                if (deferred) {
-                       iser_err("References remain for BUF-OUT rdma reg\n");
-                       BUG();
+                       iser_err("%d references remain for BUF-OUT rdma reg\n",
+                                atomic_read(&regd->ref_count));
                }
        }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to