Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 373370
b: refs/heads/master
c: 92451b4
h: refs/heads/master
v: v3
  • Loading branch information
Alex Elder authored and Sage Weil committed May 2, 2013
1 parent cf78e56 commit e7f5fc7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 23 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: dc4b870c97a5006871c259f7e61ea6c79038f731
refs/heads/master: 92451b4910895936cc05ce1d283644ffc44d7537
37 changes: 15 additions & 22 deletions trunk/net/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1779,31 +1779,24 @@ int ceph_osdc_start_request(struct ceph_osd_client *osdc,

down_read(&osdc->map_sem);
mutex_lock(&osdc->request_mutex);
/*
* 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.
*/
__register_request(osdc, req);
if (req->r_sent == 0) {
rc = __map_request(osdc, req, 0);
if (rc < 0) {
if (nofail) {
dout("osdc_start_request failed map, "
" will retry %lld\n", req->r_tid);
rc = 0;
}
goto out_unlock;
}
if (req->r_osd == NULL) {
dout("send_request %p no up osds in pg\n", req);
ceph_monc_request_next_osdmap(&osdc->client->monc);
} else {
__send_request(osdc, req);
WARN_ON(req->r_sent);
rc = __map_request(osdc, req, 0);
if (rc < 0) {
if (nofail) {
dout("osdc_start_request failed map, "
" will retry %lld\n", req->r_tid);
rc = 0;
}
rc = 0;
goto out_unlock;
}

if (req->r_osd == NULL) {
dout("send_request %p no up osds in pg\n", req);
ceph_monc_request_next_osdmap(&osdc->client->monc);
} else {
__send_request(osdc, req);
}
rc = 0;
out_unlock:
mutex_unlock(&osdc->request_mutex);
up_read(&osdc->map_sem);
Expand Down

0 comments on commit e7f5fc7

Please sign in to comment.