• Alex Elder's avatar
    rbd: look up snapshot name in names buffer · 9682fc6d
    Alex Elder authored
    Rather than scanning the list of snapshot structures for it, scan
    the snapshot context buffer containing snapshot names in order to
    determine for a format 1 image the name associated with a given
    snapshot id.
    
    Pull out the part of rbd_dev_v1_snap_info() that does this scan into
    a new function, _rbd_dev_v1_snap_name().  Have that function return
    a dynamically-allocated copy of the name, and don't duplicate it in
    rbd_dev_v1_snap_info().
    Signed-off-by: default avatarAlex Elder <elder@inktank.com>
    Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
    9682fc6d
rbd.c 130 KB