• A
    rbd: clear EXISTS flag if mapped snapshot disappears · 15228ede
    Alex Elder 提交于
    This functionality inadvertently disappeared in the last patch.
    
    Image snapshots can get removed at just about any time.  In
    particular it can disappear even if it is in use by an rbd
    client as a mapped image.
    
    The rbd client deals with such a disappearance by responding to new
    requests with ENXIO.  This is implemented by each rbd device
    maintaining an EXISTS flag, which is normally set but cleared if a
    snapshot disappears.
    
    This patch (re-)implements the clearing of that flag.
    
    Whenever mapped image header information is refreshed, if the
    mapping is for a snapshot, verify the mapped snapshot is still
    present in the updated snapshot context.  If it is not, clear the
    flag.
    
    It is not necessary to check this in the initial probe, because the
    probe will not succeed if the snapshot doesn't exist.
    
    This resolves:
        http://tracker.ceph.com/issues/4880Signed-off-by: NAlex Elder <elder@inktank.com>
    Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
    15228ede
rbd.c 126.7 KB