]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - net/ceph/osd_client.c
libceph: don't time out osd requests that haven't been received
[~shefty/rdma-dev.git] / net / ceph / osd_client.c
index 7330c2757c0c23c6cf0f11b1331d59de82983690..ce310eee708d9f76c0a631b32edb6eb046cff153 100644 (file)
@@ -1085,9 +1085,15 @@ static void handle_timeout(struct work_struct *work)
                req = list_entry(osdc->req_lru.next, struct ceph_osd_request,
                                 r_req_lru_item);
 
+               /* hasn't been long enough since we sent it? */
                if (time_before(jiffies, req->r_stamp + timeout))
                        break;
 
+               /* hasn't been long enough since it was acked? */
+               if (req->r_request->ack_stamp == 0 ||
+                   time_before(jiffies, req->r_request->ack_stamp + timeout))
+                       break;
+
                BUG_ON(req == last_req && req->r_stamp == last_stamp);
                last_req = req;
                last_stamp = req->r_stamp;