Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359593
b: refs/heads/master
c: d178a9e
h: refs/heads/master
i:
  359591: 9b97fd0
v: v3
  • Loading branch information
Alex Elder committed Jan 17, 2013
1 parent 4012ef4 commit 096049e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 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: e75b45cf36565fd8ba206a9d80f670a86e61ba2f
refs/heads/master: d178a9e74006e80f568d87e29f2a68f14fc7cbb1
3 changes: 2 additions & 1 deletion trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1148,13 +1148,14 @@ static int rbd_do_request(struct request *rq,
(unsigned long long) len, coll, coll_index);

osdc = &rbd_dev->rbd_client->client->osdc;
osd_req = ceph_osdc_alloc_request(osdc, flags, snapc, ops,
osd_req = ceph_osdc_alloc_request(osdc, snapc, ops,
false, GFP_NOIO, pages, bio);
if (!osd_req) {
ret = -ENOMEM;
goto done_pages;
}

osd_req->r_flags = flags;
osd_req->r_callback = rbd_cb;

rbd_req->rq = rq;
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/ceph/osd_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ extern int ceph_calc_raw_layout(struct ceph_file_layout *layout,
struct ceph_osd_req_op *op);

extern struct ceph_osd_request *ceph_osdc_alloc_request(struct ceph_osd_client *osdc,
int flags,
struct ceph_snap_context *snapc,
struct ceph_osd_req_op *ops,
bool use_mempool,
Expand Down
11 changes: 4 additions & 7 deletions trunk/net/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ static int get_num_ops(struct ceph_osd_req_op *ops)
}

struct ceph_osd_request *ceph_osdc_alloc_request(struct ceph_osd_client *osdc,
int flags,
struct ceph_snap_context *snapc,
struct ceph_osd_req_op *ops,
bool use_mempool,
Expand Down Expand Up @@ -208,10 +207,6 @@ struct ceph_osd_request *ceph_osdc_alloc_request(struct ceph_osd_client *osdc,
INIT_LIST_HEAD(&req->r_req_lru_item);
INIT_LIST_HEAD(&req->r_osd_item);

req->r_flags = flags;

WARN_ON((flags & (CEPH_OSD_FLAG_READ|CEPH_OSD_FLAG_WRITE)) == 0);

/* create reply message */
if (use_mempool)
msg = ceph_msgpool_get(&osdc->msgpool_op_reply, 0);
Expand Down Expand Up @@ -347,6 +342,8 @@ void ceph_osdc_build_request(struct ceph_osd_request *req,
u64 data_len = 0;
int i;

WARN_ON((flags & (CEPH_OSD_FLAG_READ|CEPH_OSD_FLAG_WRITE)) == 0);

head = msg->front.iov_base;
head->snapid = cpu_to_le64(snap_id);
op = (void *)(head + 1);
Expand Down Expand Up @@ -442,12 +439,12 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc,
} else
ops[1].op = 0;

req = ceph_osdc_alloc_request(osdc, flags,
snapc, ops,
req = ceph_osdc_alloc_request(osdc, snapc, ops,
use_mempool,
GFP_NOFS, NULL, NULL);
if (!req)
return ERR_PTR(-ENOMEM);
req->r_flags = flags;

/* calculate max write size */
r = calc_layout(vino, layout, off, plen, req, ops);
Expand Down

0 comments on commit 096049e

Please sign in to comment.