• Alex Elder's avatar
    rbd: simplify rbd_dev_v1_probe() · 30d60ba2
    Alex Elder authored
    An rbd_dev structure's fields are all zero-filled for an initial
    probe, so there's no need to explicitly zero the parent_spec
    and parent_overlap fields in rbd_dev_v1_probe().  Removing these
    assignments makes rbd_dev_v1_probe() *almost* trivial.
    
    Move the dout() message that announces discovery of an image into
    rbd_dev_image_probe(), generalize to support images in either format
    and only show it if an image is fully discovered.
    
    This highlights that are some unnecessary cleanups in the error
    path for rbd_dev_v1_probe(), so they can be removed.
    
    Now rbd_dev_v1_probe() *is* a trivial wrapper function.
    Signed-off-by: default avatarAlex Elder <elder@inktank.com>
    Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
    30d60ba2
rbd.c 129 KB