• A
    libceph: pass num_op with ops · ae7ca4a3
    Alex Elder 提交于
    Both ceph_osdc_alloc_request() and ceph_osdc_build_request() are
    provided an array of ceph osd request operations.  Rather than just
    passing the number of operations in the array, the caller is
    required append an additional zeroed operation structure to signal
    the end of the array.
    
    All callers know the number of operations at the time these
    functions are called, so drop the silly zero entry and supply that
    number directly.  As a result, get_num_ops() is no longer needed.
    This also means that ceph_osdc_alloc_request() never uses its ops
    argument, so that can be dropped.
    
    Also rbd_create_rw_ops() no longer needs to add one to reserve room
    for the additional op.
    Signed-off-by: NAlex Elder <elder@inktank.com>
    Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
    ae7ca4a3
osd_client.c 54.8 KB