aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-03-13 21:50:01 -0400
committerSage Weil <sage@inktank.com>2013-05-02 00:17:49 -0400
commitb0270324c5a9a5157f565c2de34fb1071cfdce7c (patch)
tree18e8800c8a3613400dd68aa20f4cd5cfb4fddf2b /net
parentd18d1e2807f38a94839be1f83682e17011f53322 (diff)
libceph: use osd_req_op_extent_init()
Use osd_req_op_extent_init() in ceph_osdc_new_request() to initialize the one or two ops built in that function. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'net')
-rw-r--r--net/ceph/osd_client.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 7136060a0501..55f7c9a57a43 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -581,17 +581,10 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc,
581 truncate_size = object_size; 581 truncate_size = object_size;
582 } 582 }
583 583
584 memset(&ops, 0, sizeof ops); 584 osd_req_op_extent_init(&ops[0], opcode, objoff, objlen,
585 ops[0].op = opcode; 585 truncate_size, truncate_seq);
586 ops[0].extent.offset = objoff;
587 ops[0].extent.length = objlen;
588 ops[0].extent.truncate_size = truncate_size;
589 ops[0].extent.truncate_seq = truncate_seq;
590 if (ops[0].op == CEPH_OSD_OP_WRITE)
591 ops[0].payload_len = *plen;
592
593 if (do_sync) 586 if (do_sync)
594 ops[1].op = CEPH_OSD_OP_STARTSYNC; 587 osd_req_op_init(&ops[1], CEPH_OSD_OP_STARTSYNC);
595 588
596 req->r_file_layout = *layout; /* keep a copy */ 589 req->r_file_layout = *layout; /* keep a copy */
597 590