Re: [PATCH v7 1/5] QIOChannel: Add flags on io_writev and introduce io_flush callback

2022-01-19 Thread Leonardo Bras Soares Passos
On Tue, Jan 18, 2022 at 10:58 PM Peter Xu wrote: > > On Tue, Jan 18, 2022 at 05:45:09PM -0300, Leonardo Bras Soares Passos wrote: > > Hello Peter, > > > > On Thu, Jan 13, 2022 at 3:28 AM Peter Xu wrote: > > > > > > On Thu, Jan 06, 2022 at 07:13:38PM -0300, Leonardo Bras wrote: > > > > diff --git

Re: [PATCH v7 1/5] QIOChannel: Add flags on io_writev and introduce io_flush callback

2022-01-18 Thread Leonardo Bras Soares Passos
Hello Daniel, On Thu, Jan 13, 2022 at 7:53 AM Daniel P. Berrangé wrote: > > On Thu, Jan 06, 2022 at 07:13:38PM -0300, Leonardo Bras wrote: > > Add flags to io_writev and introduce io_flush as optional callback to > > QIOChannelClass, allowing the implementation of zero copy writes by > > subclass

Re: [PATCH v7 1/5] QIOChannel: Add flags on io_writev and introduce io_flush callback

2022-01-18 Thread Peter Xu
On Tue, Jan 18, 2022 at 05:45:09PM -0300, Leonardo Bras Soares Passos wrote: > Hello Peter, > > On Thu, Jan 13, 2022 at 3:28 AM Peter Xu wrote: > > > > On Thu, Jan 06, 2022 at 07:13:38PM -0300, Leonardo Bras wrote: > > > diff --git a/io/channel.c b/io/channel.c > > > index e8b019dc36..904855e16e

Re: [PATCH v7 1/5] QIOChannel: Add flags on io_writev and introduce io_flush callback

2022-01-18 Thread Leonardo Bras Soares Passos
Hello Peter, On Thu, Jan 13, 2022 at 3:28 AM Peter Xu wrote: > > On Thu, Jan 06, 2022 at 07:13:38PM -0300, Leonardo Bras wrote: > > diff --git a/io/channel.c b/io/channel.c > > index e8b019dc36..904855e16e 100644 > > --- a/io/channel.c > > +++ b/io/channel.c > > @@ -67,12 +67,13 @@ ssize_t qio_ch

Re: [PATCH v7 1/5] QIOChannel: Add flags on io_writev and introduce io_flush callback

2022-01-13 Thread Daniel P . Berrangé
On Thu, Jan 06, 2022 at 07:13:38PM -0300, Leonardo Bras wrote: > Add flags to io_writev and introduce io_flush as optional callback to > QIOChannelClass, allowing the implementation of zero copy writes by > subclasses. > > How to use them: > - Write data using qio_channel_writev(...,QIO_CHANNEL_WR

Re: [PATCH v7 1/5] QIOChannel: Add flags on io_writev and introduce io_flush callback

2022-01-12 Thread Peter Xu
On Thu, Jan 06, 2022 at 07:13:38PM -0300, Leonardo Bras wrote: > diff --git a/io/channel.c b/io/channel.c > index e8b019dc36..904855e16e 100644 > --- a/io/channel.c > +++ b/io/channel.c > @@ -67,12 +67,13 @@ ssize_t qio_channel_readv_full(QIOChannel *ioc, > } > > > -ssize_t qio_channel_writev_

[PATCH v7 1/5] QIOChannel: Add flags on io_writev and introduce io_flush callback

2022-01-06 Thread Leonardo Bras
Add flags to io_writev and introduce io_flush as optional callback to QIOChannelClass, allowing the implementation of zero copy writes by subclasses. How to use them: - Write data using qio_channel_writev(...,QIO_CHANNEL_WRITE_FLAG_ZERO_COPY), - Wait write completion with qio_channel_flush(). Not