• Alex Elder's avatar
    rbd: define rbd_dev_image_id() · 589d30e0
    Alex Elder authored
    New format 2 rbd images are permanently identified by a unique image
    id.  Each rbd image also has a name, but the name can be changed.
    A format 2 rbd image will have an object--whose name is based on the
    image name--which maps an image's name to its image id.
    
    Create a new function rbd_dev_image_id() that checks for the
    existence of the image id object, and if it's found, records the
    image id in the rbd_device structure.
    
    Create a new rbd device attribute (/sys/bus/rbd/<num>/image_id) that
    makes this information available.
    Signed-off-by: default avatarAlex Elder <elder@inktank.com>
    Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
    589d30e0
sysfs-bus-rbd 1.75 KB