[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 3/3] block: Removed unused sector-based blocking
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-block] [PATCH 3/3] block: Removed unused sector-based blocking I/O |
Date: |
Fri, 27 Apr 2018 16:01:51 +0200 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
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 <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
> -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