Skip to content
  • Fam Zheng's avatar
    bb00021d
    block: Split BLOCK_OP_TYPE_COMMIT to BLOCK_OP_TYPE_COMMIT_{SOURCE, TARGET} · bb00021d
    Fam Zheng authored
    
    
    Like BLOCK_OP_TYPE_BACKUP_SOURCE and BLOCK_OP_TYPE_BACKUP_TARGET,
    block-commit involves two asymmetric devices.
    
    This change is not user-visible (yet), because commit only works with
    device names.
    
    But once we enable backing reference in blockdev-add, or specifying
    node-name in block-commit command, we don't want the user to start two
    commit jobs on the same backing chain, which will corrupt things because
    of the final bdrv_swap.
    
    Before we have per category blockers, splitting this type is still
    better.
    
    [Resolved virtio-blk dataplane conflict by replacing
    BLOCK_OP_TYPE_COMMIT with both BLOCK_OP_TYPE_COMMIT_{SOURCE, TARGET}.
    They are safe since the block job runs in the same AioContext as the
    dataplane IOThread.
    --Stefan]
    
    Signed-off-by: default avatarFam Zheng <famz@redhat.com>
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    bb00021d
    block: Split BLOCK_OP_TYPE_COMMIT to BLOCK_OP_TYPE_COMMIT_{SOURCE, TARGET}
    Fam Zheng authored
    
    
    Like BLOCK_OP_TYPE_BACKUP_SOURCE and BLOCK_OP_TYPE_BACKUP_TARGET,
    block-commit involves two asymmetric devices.
    
    This change is not user-visible (yet), because commit only works with
    device names.
    
    But once we enable backing reference in blockdev-add, or specifying
    node-name in block-commit command, we don't want the user to start two
    commit jobs on the same backing chain, which will corrupt things because
    of the final bdrv_swap.
    
    Before we have per category blockers, splitting this type is still
    better.
    
    [Resolved virtio-blk dataplane conflict by replacing
    BLOCK_OP_TYPE_COMMIT with both BLOCK_OP_TYPE_COMMIT_{SOURCE, TARGET}.
    They are safe since the block job runs in the same AioContext as the
    dataplane IOThread.
    --Stefan]
    
    Signed-off-by: default avatarFam Zheng <famz@redhat.com>
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Loading