block-backend: add blk_get_max_iov()

Add a function to query BlockLimits.max_iov.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Stefan Hajnoczi 2015-07-09 10:56:45 +01:00
parent bd44feb754
commit 648296e067
2 changed files with 6 additions and 0 deletions

View File

@ -1023,6 +1023,11 @@ int blk_get_max_transfer_length(BlockBackend *blk)
}
}
int blk_get_max_iov(BlockBackend *blk)
{
return blk->bs->bl.max_iov;
}
void blk_set_guest_block_size(BlockBackend *blk, int align)
{
blk->guest_block_size = align;

View File

@ -146,6 +146,7 @@ void blk_lock_medium(BlockBackend *blk, bool locked);
void blk_eject(BlockBackend *blk, bool eject_flag);
int blk_get_flags(BlockBackend *blk);
int blk_get_max_transfer_length(BlockBackend *blk);
int blk_get_max_iov(BlockBackend *blk);
void blk_set_guest_block_size(BlockBackend *blk, int align);
void *blk_blockalign(BlockBackend *blk, size_t size);
bool blk_op_is_blocked(BlockBackend *blk, BlockOpType op, Error **errp);