qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v1 00/17] dataplane: optimization and multi virt


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v1 00/17] dataplane: optimization and multi virtqueue support
Date: Wed, 13 Aug 2014 09:55:53 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, Aug 11, 2014 at 09:37:01PM +0200, Paolo Bonzini wrote:
> Il 10/08/2014 05:46, Ming Lei ha scritto:
> @@ -4356,6 +4353,20 @@ BlockDriverAIOCB *bdrv_aio_readv(BlockDriverState *bs, 
> int64_t sector_num,
>  {
>      trace_bdrv_aio_readv(bs, sector_num, nb_sectors, opaque);
>  
> +    if (bs->drv && bs->drv->bdrv_aio_readv &&
> +        bs->drv->bdrv_aio_readv != bdrv_aio_readv_em &&
> +        nb_sectors >= 0 && nb_sectors <= (UINT_MAX >> BDRV_SECTOR_BITS) &&
> +        !bdrv_check_byte_request(bs, sector_num << BDRV_SECTOR_BITS,
> +                                 nb_sectors << BDRV_SECTOR_BITS) &&
> +        !bs->copy_on_read && !bs->io_limits_enabled &&
> +        bs->request_alignment <= BDRV_SECTOR_SIZE) {
> +        BlockDriverAIOCB *acb =
> +            bs->drv->bdrv_aio_readv(bs, sector_num, qiov, nb_sectors,
> +                                    cb, opaque);
> +        assert(acb);

Minor issue:

block.h:bdrv_aio_readv() guarantees the return value is non-NULL but
BlockDriver->bdrv_aio_readv() does not.

The floppy disk (fd_open()) code path in raw-posix.c can return NULL so
we would need to return a BlockDriverAIOCB and set up a BH that will
complete with -EIO.

Stefan

Attachment: pgpK5v9FgZDvQ.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]