Skip to content
  • Stefan Hajnoczi's avatar
    block: handle -EBUSY in bdrv_commit_all() · e8877497
    Stefan Hajnoczi authored
    
    
    Monitor operations that manipulate image files must not execute while a
    background job (like image streaming) is in progress.  This prevents
    corruptions from happening when two pieces of code are manipulating the
    image file without knowledge of each other.
    
    The monitor "commit" command raises QERR_DEVICE_IN_USE when
    bdrv_commit() returns -EBUSY but "commit all" has no error handling.
    This is easy to fix, although note that we do not deliver a detailed
    error about which device was busy in the "commit all" case.
    
    Suggested-by: default avatarKevin Wolf <kwolf@redhat.com>
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    e8877497