• A
    rbd: revalidate only for mapping size changes · e627db08
    Alex Elder 提交于
    This commit:
        d98df63e rbd: revalidate_disk upon rbd resize
    instituted a call to revalidate_disk() to notify interested parties
    that a mapped image has changed size.  This works well, as long as
    the the rbd device doesn't map a snapshot.
    
    A snapshot will never change size.  However, the base image the
    snapshot is associated with can, and it can do so while the snapshot
    is mapped.
    
    The problem is that the test for the size is looking at the size of
    the base image, not the size of the mapped snapshot.  This patch
    corrects that.
    
    Update the warning message shown in the event of error, and move
    it into the callers.
    
    This resolves:
        http://tracker.ceph.com/issues/4911Signed-off-by: NAlex Elder <elder@inktank.com>
    Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
    e627db08
rbd.c 129.5 KB