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:
parent
bd44feb754
commit
648296e067
@ -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)
|
void blk_set_guest_block_size(BlockBackend *blk, int align)
|
||||||
{
|
{
|
||||||
blk->guest_block_size = align;
|
blk->guest_block_size = align;
|
||||||
|
@ -146,6 +146,7 @@ void blk_lock_medium(BlockBackend *blk, bool locked);
|
|||||||
void blk_eject(BlockBackend *blk, bool eject_flag);
|
void blk_eject(BlockBackend *blk, bool eject_flag);
|
||||||
int blk_get_flags(BlockBackend *blk);
|
int blk_get_flags(BlockBackend *blk);
|
||||||
int blk_get_max_transfer_length(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_set_guest_block_size(BlockBackend *blk, int align);
|
||||||
void *blk_blockalign(BlockBackend *blk, size_t size);
|
void *blk_blockalign(BlockBackend *blk, size_t size);
|
||||||
bool blk_op_is_blocked(BlockBackend *blk, BlockOpType op, Error **errp);
|
bool blk_op_is_blocked(BlockBackend *blk, BlockOpType op, Error **errp);
|
||||||
|
Loading…
Reference in New Issue
Block a user