Skip to content
  • Kevin Wolf's avatar
    a03ef88f
    block: Convert bdrv_co_preadv/pwritev to BdrvChild · a03ef88f
    Kevin Wolf authored
    
    
    This is the final patch for converting the common I/O path to take
    a BdrvChild parameter instead of BlockDriverState.
    
    The completion of this conversion means that all users that perform I/O
    on an image need to actually hold a reference (in the form of BdrvChild,
    possible as part of a BlockBackend) to that image. This also protects
    against inconsistent use of BlockBackend vs. BlockDriverState functions
    because direct use of a BlockDriverState isn't possible any more and
    blk->root is private for block-backends.c.
    
    In addition, we can now distinguish different users in the I/O path,
    and the future op blockers work is going to add assertions based on
    permissions stored in BdrvChild.
    
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    Acked-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    a03ef88f
    block: Convert bdrv_co_preadv/pwritev to BdrvChild
    Kevin Wolf authored
    
    
    This is the final patch for converting the common I/O path to take
    a BdrvChild parameter instead of BlockDriverState.
    
    The completion of this conversion means that all users that perform I/O
    on an image need to actually hold a reference (in the form of BdrvChild,
    possible as part of a BlockBackend) to that image. This also protects
    against inconsistent use of BlockBackend vs. BlockDriverState functions
    because direct use of a BlockDriverState isn't possible any more and
    blk->root is private for block-backends.c.
    
    In addition, we can now distinguish different users in the I/O path,
    and the future op blockers work is going to add assertions based on
    permissions stored in BdrvChild.
    
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    Acked-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Loading