diff options
author | Alex Elder <elder@inktank.com> | 2013-03-14 20:09:05 +0100 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-02 06:17:58 +0200 |
commit | acead002b200569273bed331c93c4a91d25e10b8 (patch) | |
tree | 779bf689da149acf73bd75f51641f3700469f6b7 /net/9p | |
parent | libceph: record message data length (diff) | |
download | linux-acead002b200569273bed331c93c4a91d25e10b8.tar.xz linux-acead002b200569273bed331c93c4a91d25e10b8.zip |
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 'net/9p')
0 files changed, 0 insertions, 0 deletions