Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188652
b: refs/heads/master
c: 93c20d9
h: refs/heads/master
v: v3
  • Loading branch information
Yehuda Sadeh authored and Sage Weil committed Dec 22, 2009
1 parent 5bb31df commit 64d4bae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 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: b3d1dbbdd5670d8a9fb01f7dfb1cac522ff6795a
refs/heads/master: 93c20d98c29ccefa039c3843ccc37122caaf3d31
5 changes: 4 additions & 1 deletion trunk/fs/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc,
ceph_osdc_put_request(req);
return ERR_PTR(-ENOMEM);
}
req->r_num_prealloc_reply = num_reply;

req->r_osdc = osdc;
req->r_mempool = use_mempool;
Expand All @@ -165,7 +166,7 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc,
else
msg = ceph_msg_new(CEPH_MSG_OSD_OP, msg_size, 0, 0, NULL);
if (IS_ERR(msg)) {
ceph_msgpool_resv(&osdc->msgpool_op_reply, num_reply);
ceph_msgpool_resv(&osdc->msgpool_op_reply, -num_reply);
ceph_osdc_put_request(req);
return ERR_PTR(PTR_ERR(msg));
}
Expand Down Expand Up @@ -465,6 +466,8 @@ static void __unregister_request(struct ceph_osd_client *osdc,
rb_erase(&req->r_node, &osdc->requests);
osdc->num_requests--;

ceph_msgpool_resv(&osdc->msgpool_op_reply, -req->r_num_prealloc_reply);

if (req->r_osd) {
/* make sure the original request isn't in flight. */
ceph_con_revoke(&req->r_osd->o_con, req->r_request);
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/ceph/osd_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ struct ceph_osd_request {
int r_flags; /* any additional flags for the osd */
u32 r_sent; /* >0 if r_request is sending/sent */
int r_prepared_pages, r_got_reply;
int r_num_prealloc_reply;

struct ceph_osd_client *r_osdc;
struct kref r_kref;
Expand Down

0 comments on commit 64d4bae

Please sign in to comment.