diff options
author | Alex Elder <elder@inktank.com> | 2013-03-08 13:35:36 -0600 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-01 21:17:02 -0700 |
commit | 175face2ba31025b0dcd6da4e711fca7764287fa (patch) | |
tree | 8da146e3a923614defe47d78e0e262a1671b7f1a /include/crypto/cast6.h | |
parent | e766d7b55e10f93c7bab298135a4e90dcc46620d (diff) |
libceph: let osd ops determine request data length
The length of outgoing data in an osd request is dependent on the
osd ops that are embedded in that request. Each op is encoded into
a request message using osd_req_encode_op(), so that should be used
to determine the amount of outgoing data implied by the op as it
is encoded.
Have osd_req_encode_op() return the number of bytes of outgoing data
implied by the op being encoded, and accumulate and use that in
ceph_osdc_build_request().
As a result, ceph_osdc_build_request() no longer requires its "len"
parameter, so get rid of it.
Using the sum of the op lengths rather than the length provided is
a valid change because:
- The only callers of osd ceph_osdc_build_request() are
rbd and the osd client (in ceph_osdc_new_request() on
behalf of the file system).
- When rbd calls it, the length provided is only non-zero for
write requests, and in that case the single op has the
same length value as what was passed here.
- When called from ceph_osdc_new_request(), (it's not all that
easy to see, but) the length passed is also always the same
as the extent length encoded in its (single) write op if
present.
This resolves:
http://tracker.ceph.com/issues/4406
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'include/crypto/cast6.h')
0 files changed, 0 insertions, 0 deletions