diff options
author | Alex Elder <elder@inktank.com> | 2013-03-14 14:09:05 -0500 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-01 21:17:58 -0700 |
commit | acead002b200569273bed331c93c4a91d25e10b8 (patch) | |
tree | 779bf689da149acf73bd75f51641f3700469f6b7 /lib/list_debug.c | |
parent | a19308048182d5f9e16b03b1d1c038d9346c7589 (diff) | |
download | linux-acead002b200569273bed331c93c4a91d25e10b8.tar.gz |
libceph: don't build request in ceph_osdc_new_request()
This patch moves the call to ceph_osdc_build_request() out of
ceph_osdc_new_request() and into its caller.
This is in order to defer formatting osd operation information into
the request message until just before request is started.
The only unusual (ab)user of ceph_osdc_build_request() is
ceph_writepages_start(), where the final length of write request may
change (downward) based on the current inode size or the oldest
snapshot context with dirty data for the inode.
The remaining callers don't change anything in the request after has
been built.
This means the ops array is now supplied by the caller. It also
means there is no need to pass the mtime to ceph_osdc_new_request()
(it gets provided to ceph_osdc_build_request()). And rather than
passing a do_sync flag, have the number of ops in the ops array
supplied imply adding a second STARTSYNC operation after the READ or
WRITE requested.
This and some of the patches that follow are related to having the
messenger (only) be responsible for filling the content of the
message header, as described here:
http://tracker.ceph.com/issues/4589
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'lib/list_debug.c')
0 files changed, 0 insertions, 0 deletions