Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 373300
b: refs/heads/master
c: dbe0fc4
h: refs/heads/master
v: v3
  • Loading branch information
Alex Elder authored and Sage Weil committed May 2, 2013
1 parent 790d455 commit d4130e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 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: 47a05811b656915789bdd4c7e8cc18007e09c56d
refs/heads/master: dbe0fc4188ee568d6e26fe938a653f01e18d6f4e
12 changes: 5 additions & 7 deletions trunk/net/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ static int op_has_extent(int op)
*
* fill osd op in request message.
*/
static int calc_layout(struct ceph_vino vino,
struct ceph_file_layout *layout,
u64 off, u64 *plen,
static int calc_layout(struct ceph_file_layout *layout, u64 off, u64 *plen,
struct ceph_osd_request *req,
struct ceph_osd_req_op *op, u64 *bno)
{
Expand Down Expand Up @@ -105,9 +103,6 @@ static int calc_layout(struct ceph_vino vino,
dout("calc_layout bno=%llx %llu~%llu (%d pages)\n",
*bno, objoff, objlen, req->r_num_pages);

snprintf(req->r_oid, sizeof(req->r_oid), "%llx.%08llx", vino.ino, *bno);
req->r_oid_len = strlen(req->r_oid);

return 0;
}

Expand Down Expand Up @@ -469,14 +464,17 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc,
req->r_flags = flags;

/* calculate max write size */
r = calc_layout(vino, layout, off, plen, req, ops, &bno);
r = calc_layout(layout, off, plen, req, ops, &bno);
if (r < 0) {
ceph_osdc_put_request(req);
return ERR_PTR(r);
}

req->r_file_layout = *layout; /* keep a copy */

snprintf(req->r_oid, sizeof(req->r_oid), "%llx.%08llx", vino.ino, bno);
req->r_oid_len = strlen(req->r_oid);

/* in case it differs from natural (file) alignment that
calc_layout filled in for us */
req->r_num_pages = calc_pages_for(page_align, *plen);
Expand Down

0 comments on commit d4130e7

Please sign in to comment.