ceph: unregister canceled/timed out osd requests
authorSage Weil <sage@newdream.net>
Tue, 22 Dec 2009 18:29:39 +0000 (10:29 -0800)
committerSage Weil <sage@newdream.net>
Wed, 23 Dec 2009 16:17:19 +0000 (08:17 -0800)
Canceled or timed out osd requests were getting left in the request list
and never deallocated (until umount).  Unregister if they are canceled
(control-c) or time out.

Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/osd_client.c

index b474b3ad61f0616f7265e014e46320f13c9a884f..a1800fb63237d6fcffbc8bb82e6cf952d3e6b313 100644 (file)
@@ -1071,8 +1071,9 @@ int ceph_osdc_wait_request(struct ceph_osd_client *osdc,
        if (rc < 0) {
                mutex_lock(&osdc->request_mutex);
                __cancel_request(req);
+               __unregister_request(osdc, req);
                mutex_unlock(&osdc->request_mutex);
-               dout("wait_request tid %llu timed out\n", req->r_tid);
+               dout("wait_request tid %llu canceled/timed out\n", req->r_tid);
                return rc;
        }