• Alex Elder's avatar
    rbd: don't destroy rbd_dev in device release function · 200a6a8b
    Alex Elder authored
    Rename rbd_dev_probe_finish() to be rbd_dev_device_setup().  Its
    purpose is to set up the Linux side of an rbd device mapping.
    Rename rbd_dev_release() to be rbd_dev_device_release(), making
    it more obvious it serves as the inverse of the setup function
    (or it will).
    
    Encapsulate some of what was done in rbd_dev_release() into a new
    function rbd_dev_image_release(), which serves as the inverse of
    setting up the ceph side of the mapped rbd image.
    
    Define a new helper rbd_dev_clear_mapping() to simply zero out the
    fields of a mapping structure--the inverse of rbd_dev_set_mapping().
    Signed-off-by: default avatarAlex Elder <elder@inktank.com>
    Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
    200a6a8b
rbd.c 130 KB