Skip to content
  • Eric Blake's avatar
    74a4320f
    qemu-img: Fail fast on convert --bitmaps with inconsistent bitmap · 74a4320f
    Eric Blake authored
    
    
    Waiting until the end of the convert operation (a potentially
    time-consuming task) to finally detect that we can't copy a bitmap is
    bad, comparing to failing fast up front.  Furthermore, this prevents
    us from leaving a file behind with a bitmap that is not marked as
    inconsistent even though it does not have sane contents.
    
    This fixes the problems exposed in the previous patch to the iotest:
    it adds a fast failure up front, and even if we don't fail early, it
    ensures that any bitmap we add but do not properly populate is removed
    again rather than left behind incomplete.
    
    Signed-off-by: default avatarEric Blake <eblake@redhat.com>
    Message-Id: <20210709153951.2801666-3-eblake@redhat.com>
    [eblake: add a hint to the warning message, simplify name computation]
    Reviewed-by: default avatarNir Soffer <nsoffer@redhat.com>
    Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
    74a4320f
    qemu-img: Fail fast on convert --bitmaps with inconsistent bitmap
    Eric Blake authored
    
    
    Waiting until the end of the convert operation (a potentially
    time-consuming task) to finally detect that we can't copy a bitmap is
    bad, comparing to failing fast up front.  Furthermore, this prevents
    us from leaving a file behind with a bitmap that is not marked as
    inconsistent even though it does not have sane contents.
    
    This fixes the problems exposed in the previous patch to the iotest:
    it adds a fast failure up front, and even if we don't fail early, it
    ensures that any bitmap we add but do not properly populate is removed
    again rather than left behind incomplete.
    
    Signed-off-by: default avatarEric Blake <eblake@redhat.com>
    Message-Id: <20210709153951.2801666-3-eblake@redhat.com>
    [eblake: add a hint to the warning message, simplify name computation]
    Reviewed-by: default avatarNir Soffer <nsoffer@redhat.com>
    Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Loading