Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188569
b: refs/heads/master
c: c1ea882
h: refs/heads/master
i:
  188567: ab5cf8f
v: v3
  • Loading branch information
Sage Weil committed Oct 9, 2009
1 parent 6d7463e commit 59c47fb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0656d11ba6ffa3dee0e8916a1903f96185651217
refs/heads/master: c1ea8823be69ebebaface912142190e910711984
30 changes: 19 additions & 11 deletions trunk/fs/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,8 @@ static void kick_requests(struct ceph_osd_client *osdc,
}

kick:
dout("kicking tid %llu osd%d\n", req->r_tid, req->r_osd->o_osd);
dout("kicking %p tid %llu osd%d\n", req, req->r_tid,
req->r_osd->o_osd);
req->r_flags |= CEPH_OSD_FLAG_RETRY;
err = __send_request(osdc, req);
if (err) {
Expand Down Expand Up @@ -1016,7 +1017,7 @@ int ceph_osdc_start_request(struct ceph_osd_client *osdc,
struct ceph_osd_request *req,
bool nofail)
{
int rc;
int rc = 0;

req->r_request->pages = req->r_pages;
req->r_request->nr_pages = req->r_num_pages;
Expand All @@ -1025,15 +1026,22 @@ int ceph_osdc_start_request(struct ceph_osd_client *osdc,

down_read(&osdc->map_sem);
mutex_lock(&osdc->request_mutex);
rc = __send_request(osdc, req);
if (rc) {
if (nofail) {
dout("osdc_start_request failed send, marking %lld\n",
req->r_tid);
req->r_resend = true;
rc = 0;
} else {
__unregister_request(osdc, req);
/*
* a racing kick_requests() may have sent the message for us
* while we dropped request_mutex above, so only send now if
* the request still han't been touched yet.
*/
if (req->r_sent == 0) {
rc = __send_request(osdc, req);
if (rc) {
if (nofail) {
dout("osdc_start_request failed send, "
" marking %lld\n", req->r_tid);
req->r_resend = true;
rc = 0;
} else {
__unregister_request(osdc, req);
}
}
}
mutex_unlock(&osdc->request_mutex);
Expand Down

0 comments on commit 59c47fb

Please sign in to comment.