• Alex Elder's avatar
    libceph: clean up ceph_osd_new_request() · d18d1e28
    Alex Elder authored
    All callers of ceph_osd_new_request() pass either CEPH_OSD_OP_READ
    or CEPH_OSD_OP_WRITE as the opcode value.  The function assumes it
    by filling in the extent fields in the ops array it builds.  So just
    assert that is the case, and don't bother calling op_has_extent()
    before filling in the first osd operation in the array.
    
    Define some local variables to gather the information to fill into
    the first op, and then fill in the op array all in one place.
    Signed-off-by: default avatarAlex Elder <elder@inktank.com>
    Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
    d18d1e28
osd_client.c 61.5 KB