[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] [PATCH 07/10] io: add qio_channel_read/wri
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [Qemu-block] [PATCH 07/10] io: add qio_channel_read/write_all |
Date: |
Wed, 30 Aug 2017 15:33:50 +0100 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
On Tue, Aug 22, 2017 at 03:18:29PM +0200, Paolo Bonzini wrote:
> @@ -315,6 +315,23 @@ ssize_t qio_channel_read(QIOChannel *ioc,
> Error **errp);
>
> /**
> + * qio_channel_read_all:
> + * @ioc: the channel object
> + * @buf: the memory region to read data into
> + * @buflen: the number of bytes to @buf
> + * @errp: pointer to a NULL-initialized error object
> + *
> + * Reads @buflen bytes into @buf, possibly blocking or (if the
> + * channel is non-blocking) yielding from the current coroutine
> + * multiple times until the entire content is read. Otherwise
> + * behaves as qio_channel_read().
> + */
> +ssize_t coroutine_fn qio_channel_read_all(QIOChannel *ioc,
This function is not coroutine_fn. It only assumes coroutine context
when called on a non-blocking socket.
> + char *buf,
> + size_t buflen,
> + Error **errp);
> +
> +/**
> * qio_channel_write:
> * @ioc: the channel object
> * @buf: the memory regions to send data from
> @@ -331,6 +348,23 @@ ssize_t qio_channel_write(QIOChannel *ioc,
> Error **errp);
>
> /**
> + * qio_channel_write_all:
> + * @ioc: the channel object
> + * @buf: the memory region to write data into
> + * @buflen: the number of bytes to @buf
> + * @errp: pointer to a NULL-initialized error object
> + *
> + * Writes @buflen bytes from @buf, possibly blocking or (if the
> + * channel is non-blocking) yielding from the current coroutine
> + * multiple times until the entire content is written. Otherwise
> + * behaves as qio_channel_write().
> + */
> +ssize_t coroutine_fn qio_channel_write_all(QIOChannel *ioc,
This function is not coroutine_fn. It only assumes coroutine context
when called on a non-blocking socket.
- Re: [Qemu-devel] [PATCH 06/10] scsi, file-posix: add support for persistent reservation management, (continued)
- Re: [Qemu-devel] [PATCH 06/10] scsi, file-posix: add support for persistent reservation management, Fam Zheng, 2017/08/23
- Re: [Qemu-devel] [PATCH 06/10] scsi, file-posix: add support for persistent reservation management, Eric Blake, 2017/08/24
- Re: [Qemu-devel] [PATCH 06/10] scsi, file-posix: add support for persistent reservation management, Daniel P. Berrange, 2017/08/30
- Re: [Qemu-devel] [Qemu-block] [PATCH 06/10] scsi, file-posix: add support for persistent reservation management, Stefan Hajnoczi, 2017/08/30
- [Qemu-devel] [PATCH 07/10] io: add qio_channel_read/write_all, Paolo Bonzini, 2017/08/22
- [Qemu-devel] [PATCH 10/10] scsi: add persistent reservation manager using qemu-pr-helper, Paolo Bonzini, 2017/08/22
- [Qemu-devel] [PATCH 08/10] scsi: build qemu-pr-helper, Paolo Bonzini, 2017/08/22