ceph: cancel osd requests before resending them
authorSage Weil <sage@newdream.net>
Fri, 9 Oct 2009 17:31:32 +0000 (10:31 -0700)
committerSage Weil <sage@newdream.net>
Fri, 9 Oct 2009 18:58:20 +0000 (11:58 -0700)
This ensures we don't submit the same request twice if we are kicking a
specific osd (as with an osd_reset), or when we hit a transient error and
resend.

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

index 4a8b4f08d4ae0d76d74d5f566600412156275649..8e33928647f43bc84bf97550b645985339cccfc0 100644 (file)
@@ -813,10 +813,13 @@ static void kick_requests(struct ceph_osd_client *osdc,
 
                if (req->r_resend) {
                        dout(" r_resend set on tid %llu\n", req->r_tid);
+                       __cancel_request(req);
                        goto kick;
                }
-               if (req->r_osd && kickosd == req->r_osd)
+               if (req->r_osd && kickosd == req->r_osd) {
+                       __cancel_request(req);
                        goto kick;
+               }
 
                err = __map_osds(osdc, req);
                if (err == 0)