• Alex Elder's avatar
    rbd: encapsulate code that gets snapshot info · cd892126
    Alex Elder authored
    
    
    Create a function that encapsulates looking up the name, size and
    features related to a given snapshot, which is indicated by its
    index in an rbd device's snapshot context array of snapshot ids.
    
    This interface will be used to hide differences between the format 1
    and format 2 images.
    
    At the moment this (looking up the name anyway) is slightly less
    efficient than what's done currently, but we may be able to optimize
    this a bit later on by cacheing the last lookup if it proves to be a
    problem.
    Signed-off-by: default avatarAlex Elder <elder@inktank.com>
    Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
    cd892126
rbd.c 66.9 KB