On Thu 26 Apr 2018 03:43:05 PM CEST, Eric Blake wrote:
> We are gradually moving away from sector-based interfaces, towards
> byte-based. Now that all callers of blocking I/O have been converted
> to use our preferred byte-based bdrv_p{read,write}(), we can
> delete the unused bdrv_{read,write}().
>
> Signed-off-by: Eric Blake <[email protected]>
Reviewed-by: Alberto Garcia <[email protected]>
> -static int bdrv_rw_co(BdrvChild *child, int64_t sector_num, uint8_t *buf,
> - int nb_sectors, bool is_write, BdrvRequestFlags flags)
> -{
> - QEMUIOVector qiov;
> - struct iovec iov = {
> - .iov_base = (void *)buf,
> - .iov_len = nb_sectors * BDRV_SECTOR_SIZE,
> - };
> -
> - if (nb_sectors < 0 || nb_sectors > BDRV_REQUEST_MAX_SECTORS) {
> - return -EINVAL;
> - }
Do we have a check for BDRV_REQUEST_MAX_BYTES in the byte-based API?
Berto