Skip to content

Commit

Permalink
ceph: cancel osd requests before resending them
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sage Weil committed Oct 9, 2009
1 parent 81b024e commit 266673d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 266673d

Please sign in to comment.