• Alex Elder's avatar
    rbd: don't clean up watch in device release function · 0d8189e1
    Alex Elder authored
    Currently, a watch on an rbd device header object gets torn down
    when its final Linux device reference gets dropped.  Instead, tear
    it down when removing the device.  If an error occurs cleaning up
    the watch event when unmapping, abort the unmap request.
    
    All images (including parents) still get watch requests set up, so
    tear these down also, in rbd_dev_remove_parent().  For now, ignore
    any errors that occur in this case.
    
    Get rid of local variable "rc" in rbd_remove(); use "ret" instead
    (they both somehow ended up defined in the function and only one is
    needed).
    Signed-off-by: default avatarAlex Elder <elder@inktank.com>
    Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
    0d8189e1
rbd.c 130 KB