]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
rbd: rearrange some code for consistency
authorAlex Elder <elder@inktank.com>
Fri, 5 Apr 2013 06:27:12 +0000 (01:27 -0500)
committerAlex Elder <elder@inktank.com>
Mon, 8 Apr 2013 19:22:27 +0000 (14:22 -0500)
commitcf630a65d73d780a246fa29e02a6cea02d4b137a
tree215df75dde88f2cdfa8f42c5272affb07edad867
parent50bad0e964b88c9d657889a2992bee4a45aad624
rbd: rearrange some code for consistency

This patch just trivially moves around some code for consistency.

In preparation for initializing osd request data fields in
ceph_osdc_build_request(), I wanted to verify that rbd did in fact
call that immediately before it called ceph_osdc_start_request().
It was true (although image requests are built in a group and then
started as a group).  But I made the changes here just to make
it more obvious, by making all of the calls follow a common
sequence:
osd_req_op_<optype>_init();
ceph_osd_data_<type>_init()
osd_req_op_<optype>_<datafield>()
rbd_osd_req_format()
...
ret = rbd_obj_request_submit()

I moved the initialization of the callback for image object requests
into rbd_img_request_fill_bio(), again, for consistency.  To avoid
a forward reference, I moved the definition of rbd_img_obj_callback()
up in the file.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
drivers/block/rbd.c