• Alex Elder's avatar
    libceph: pass offset and length out of calc_layout() · 75d1c941
    Alex Elder authored
    The purpose of calc_layout() is to determine, given a file offset
    and length and a layout describing the placement of file data across
    objects, where in "object space" that data resides.
    
    Specifically, it determines which object should hold the first part
    of the specified range of file data, and the offset and length of
    data within that object.  The length will not exceed the bounds
    of the object, and the caller is informed of that maximum length.
    
    Add two parameters to calc_layout() to allow the object-relative
    offset and length to be passed back to the caller.
    
    This is the first steps toward having ceph_osdc_new_request() build
    its osd op structure using osd_req_op_extent_init().
    Signed-off-by: default avatarAlex Elder <elder@inktank.com>
    Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
    75d1c941
osd_client.c 61.6 KB