aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/osd_client.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-10-09 13:31:32 -0400
committerSage Weil <sage@newdream.net>2009-10-09 14:58:20 -0400
commit266673db423e6ab247170d6c6d72ec36e530a911 (patch)
treed86b9d3b3e34fbf2dcc64b21d73145fd962237ac /fs/ceph/osd_client.c
parent81b024e70fed635a2cf5a4bf911db1649bb005f5 (diff)
ceph: cancel osd requests before resending them
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>
Diffstat (limited to 'fs/ceph/osd_client.c')
-rw-r--r--fs/ceph/osd_client.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ceph/osd_client.c b/fs/ceph/osd_client.c
index 4a8b4f08d4ae..8e33928647f4 100644
--- a/fs/ceph/osd_client.c
+++ b/fs/ceph/osd_client.c
@@ -813,10 +813,13 @@ static void kick_requests(struct ceph_osd_client *osdc,
813 813
814 if (req->r_resend) { 814 if (req->r_resend) {
815 dout(" r_resend set on tid %llu\n", req->r_tid); 815 dout(" r_resend set on tid %llu\n", req->r_tid);
816 __cancel_request(req);
816 goto kick; 817 goto kick;
817 } 818 }
818 if (req->r_osd && kickosd == req->r_osd) 819 if (req->r_osd && kickosd == req->r_osd) {
820 __cancel_request(req);
819 goto kick; 821 goto kick;
822 }
820 823
821 err = __map_osds(osdc, req); 824 err = __map_osds(osdc, req);
822 if (err == 0) 825 if (err == 0)