• A
    libceph: set response data fields earlier · 70636773
    Alex Elder 提交于
    When an incoming message is destined for the osd client, the
    messenger calls the osd client's alloc_msg method.  That function
    looks up which request has the tid matching the incoming message,
    and returns the request message that was preallocated to receive the
    response.  The response message is therefore known before the
    request is even started.
    
    Between the start of the request and the receipt of the response,
    the request and its data fields will not change, so there's no
    reason we need to hold off setting them.  In fact it's preferable
    to set them just once because it's more obvious that they're
    unchanging.
    
    So set up the fields describing where incoming data is to land in a
    response message at the beginning of ceph_osdc_start_request().
    Define a helper function that sets these fields, and use it to
    set the fields for both outgoing data in the request message and
    incoming data in the response.
    
    This resolves:
        http://tracker.ceph.com/issues/4284Signed-off-by: NAlex Elder <elder@inktank.com>
    Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
    70636773
osd_client.c 58.0 KB