[SCSI] zfcp: Only increment req_id for successfully issued requests
authorChristof Schmitt <christof.schmitt@de.ibm.com>
Mon, 2 Mar 2009 12:08:58 +0000 (13:08 +0100)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Thu, 12 Mar 2009 17:58:19 +0000 (12:58 -0500)
Only increment the req_id for successfully issued requests. This
avoids some confusion when debugging issued fsf requests.

Acked-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/s390/scsi/zfcp_fsf.c

index cce698114b0b723f23c9f561e90de3c8134afbc8..14d7413b9e86324e2a042d2acc76c2917ccb8bd4 100644 (file)
@@ -735,7 +735,7 @@ static struct zfcp_fsf_req *zfcp_fsf_req_create(struct zfcp_adapter *adapter,
 
        req->adapter = adapter;
        req->fsf_command = fsf_cmd;
-       req->req_id = adapter->req_no++;
+       req->req_id = adapter->req_no;
        req->sbal_number = 1;
        req->sbal_first = req_q->first;
        req->sbal_last = req_q->first;
@@ -798,6 +798,7 @@ static int zfcp_fsf_req_send(struct zfcp_fsf_req *req)
        /* Don't increase for unsolicited status */
        if (req->qtcb)
                adapter->fsf_req_seq_no++;
+       adapter->req_no++;
 
        return 0;
 }