mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
libceph: set message data when building osd request
All calls of ceph_osdc_start_request() are preceded (in the case of
rbd, almost) immediately by a call to ceph_osdc_build_request().
Move the build calls at the top of ceph_osdc_start_request() out of
there and into the ceph_osdc_build_request(). Nothing prevents
moving these calls to the top of ceph_osdc_build_request(), either
(and we're going to want them there in the next patch) so put them
at the top.
This and the next patch are related to:
http://tracker.ceph.com/issues/4657
Signed-off-by: Alex Elder <[email protected]>
Reviewed-by: Josh Durgin <[email protected]>
This commit is contained in:
parent
e65550fd94
commit
39b44cbe86
1 changed files with 5 additions and 5 deletions
|
|
@ -1884,6 +1884,11 @@ void ceph_osdc_build_request(struct ceph_osd_request *req, u64 off,
|
|||
u64 data_len;
|
||||
unsigned int i;
|
||||
|
||||
/* Set up response incoming data and request outgoing data fields */
|
||||
|
||||
ceph_osdc_msg_data_set(req->r_reply, &req->r_data_in);
|
||||
ceph_osdc_msg_data_set(req->r_request, &req->r_data_out);
|
||||
|
||||
req->r_snapid = snap_id;
|
||||
req->r_snapc = ceph_get_snap_context(snapc);
|
||||
|
||||
|
|
@ -1976,11 +1981,6 @@ int ceph_osdc_start_request(struct ceph_osd_client *osdc,
|
|||
{
|
||||
int rc = 0;
|
||||
|
||||
/* Set up response incoming data and request outgoing data fields */
|
||||
|
||||
ceph_osdc_msg_data_set(req->r_reply, &req->r_data_in);
|
||||
ceph_osdc_msg_data_set(req->r_request, &req->r_data_out);
|
||||
|
||||
down_read(&osdc->map_sem);
|
||||
mutex_lock(&osdc->request_mutex);
|
||||
__register_request(osdc, req);
|
||||
|
|
|
|||
Loading…
Reference in a new issue