diff options
author | Alex Elder <elder@inktank.com> | 2013-04-05 02:27:12 -0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-02 00:18:22 -0400 |
commit | 39b44cbe86db42e70693787b2ede81c309925d0b (patch) | |
tree | a8e793656a0dde8d18f8f5f51bc39ca1b6749562 /net/ceph | |
parent | e65550fd94c5c01b438e24fbf4a29ba65709ec97 (diff) |
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 <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'net/ceph')
-rw-r--r-- | net/ceph/osd_client.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 3fe8a7909ed9..932b8af8b8ee 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c | |||
@@ -1884,6 +1884,11 @@ void ceph_osdc_build_request(struct ceph_osd_request *req, u64 off, | |||
1884 | u64 data_len; | 1884 | u64 data_len; |
1885 | unsigned int i; | 1885 | unsigned int i; |
1886 | 1886 | ||
1887 | /* Set up response incoming data and request outgoing data fields */ | ||
1888 | |||
1889 | ceph_osdc_msg_data_set(req->r_reply, &req->r_data_in); | ||
1890 | ceph_osdc_msg_data_set(req->r_request, &req->r_data_out); | ||
1891 | |||
1887 | req->r_snapid = snap_id; | 1892 | req->r_snapid = snap_id; |
1888 | req->r_snapc = ceph_get_snap_context(snapc); | 1893 | req->r_snapc = ceph_get_snap_context(snapc); |
1889 | 1894 | ||
@@ -1976,11 +1981,6 @@ int ceph_osdc_start_request(struct ceph_osd_client *osdc, | |||
1976 | { | 1981 | { |
1977 | int rc = 0; | 1982 | int rc = 0; |
1978 | 1983 | ||
1979 | /* Set up response incoming data and request outgoing data fields */ | ||
1980 | |||
1981 | ceph_osdc_msg_data_set(req->r_reply, &req->r_data_in); | ||
1982 | ceph_osdc_msg_data_set(req->r_request, &req->r_data_out); | ||
1983 | |||
1984 | down_read(&osdc->map_sem); | 1984 | down_read(&osdc->map_sem); |
1985 | mutex_lock(&osdc->request_mutex); | 1985 | mutex_lock(&osdc->request_mutex); |
1986 | __register_request(osdc, req); | 1986 | __register_request(osdc, req); |