All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: qemu-devel@nongnu.org
Cc: "Peter Xu" <peterx@redhat.com>,
	"Daniel P . Berrangé" <berrange@redhat.com>
Subject: [PULL 04/22] io: Add flags argument to qio_channel_readv_full_all_eof
Date: Fri, 14 Feb 2025 17:31:41 -0300	[thread overview]
Message-ID: <20250214203159.30168-5-farosas@suse.de> (raw)
In-Reply-To: <20250214203159.30168-1-farosas@suse.de>

We want to pass flags into qio_channel_tls_readv() but
qio_channel_readv_full_all_eof() doesn't take a flags argument.

No functional change.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Acked-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
 hw/remote/mpqemu-link.c | 2 +-
 include/io/channel.h    | 2 ++
 io/channel.c            | 9 ++++++---
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/hw/remote/mpqemu-link.c b/hw/remote/mpqemu-link.c
index e25f97680d..49885a1db6 100644
--- a/hw/remote/mpqemu-link.c
+++ b/hw/remote/mpqemu-link.c
@@ -110,7 +110,7 @@ static ssize_t mpqemu_read(QIOChannel *ioc, void *buf, size_t len, int **fds,
         bql_unlock();
     }
 
-    ret = qio_channel_readv_full_all_eof(ioc, &iov, 1, fds, nfds, errp);
+    ret = qio_channel_readv_full_all_eof(ioc, &iov, 1, fds, nfds, 0, errp);
 
     if (drop_bql && !iothread && !qemu_in_coroutine()) {
         bql_lock();
diff --git a/include/io/channel.h b/include/io/channel.h
index bdf0bca92a..58940eead5 100644
--- a/include/io/channel.h
+++ b/include/io/channel.h
@@ -885,6 +885,7 @@ void qio_channel_set_aio_fd_handler(QIOChannel *ioc,
  * @niov: the length of the @iov array
  * @fds: an array of file handles to read
  * @nfds: number of file handles in @fds
+ * @flags: read flags (QIO_CHANNEL_READ_FLAG_*)
  * @errp: pointer to a NULL-initialized error object
  *
  *
@@ -903,6 +904,7 @@ int coroutine_mixed_fn qio_channel_readv_full_all_eof(QIOChannel *ioc,
                                                       const struct iovec *iov,
                                                       size_t niov,
                                                       int **fds, size_t *nfds,
+                                                      int flags,
                                                       Error **errp);
 
 /**
diff --git a/io/channel.c b/io/channel.c
index e3f17c24a0..ebd9322765 100644
--- a/io/channel.c
+++ b/io/channel.c
@@ -115,7 +115,8 @@ int coroutine_mixed_fn qio_channel_readv_all_eof(QIOChannel *ioc,
                                                  size_t niov,
                                                  Error **errp)
 {
-    return qio_channel_readv_full_all_eof(ioc, iov, niov, NULL, NULL, errp);
+    return qio_channel_readv_full_all_eof(ioc, iov, niov, NULL, NULL, 0,
+                                          errp);
 }
 
 int coroutine_mixed_fn qio_channel_readv_all(QIOChannel *ioc,
@@ -130,6 +131,7 @@ int coroutine_mixed_fn qio_channel_readv_full_all_eof(QIOChannel *ioc,
                                                       const struct iovec *iov,
                                                       size_t niov,
                                                       int **fds, size_t *nfds,
+                                                      int flags,
                                                       Error **errp)
 {
     int ret = -1;
@@ -155,7 +157,7 @@ int coroutine_mixed_fn qio_channel_readv_full_all_eof(QIOChannel *ioc,
     while ((nlocal_iov > 0) || local_fds) {
         ssize_t len;
         len = qio_channel_readv_full(ioc, local_iov, nlocal_iov, local_fds,
-                                     local_nfds, 0, errp);
+                                     local_nfds, flags, errp);
         if (len == QIO_CHANNEL_ERR_BLOCK) {
             if (qemu_in_coroutine()) {
                 qio_channel_yield(ioc, G_IO_IN);
@@ -222,7 +224,8 @@ int coroutine_mixed_fn qio_channel_readv_full_all(QIOChannel *ioc,
                                                   int **fds, size_t *nfds,
                                                   Error **errp)
 {
-    int ret = qio_channel_readv_full_all_eof(ioc, iov, niov, fds, nfds, errp);
+    int ret = qio_channel_readv_full_all_eof(ioc, iov, niov, fds, nfds, 0,
+                                             errp);
 
     if (ret == 0) {
         error_setg(errp, "Unexpected end-of-file before all data were read");
-- 
2.35.3



  parent reply	other threads:[~2025-02-15  1:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-14 20:31 [PULL 00/22] Migration patches for 2025-02-14 Fabiano Rosas
2025-02-14 20:31 ` [PULL 01/22] crypto: Allow gracefully ending the TLS session Fabiano Rosas
2025-02-14 20:31 ` [PULL 02/22] io: tls: Add qio_channel_tls_bye Fabiano Rosas
2025-02-14 20:31 ` [PULL 03/22] crypto: Remove qcrypto_tls_session_get_handshake_status Fabiano Rosas
2025-02-14 20:31 ` Fabiano Rosas [this message]
2025-02-14 20:31 ` [PULL 05/22] io: Add a read flag for relaxed EOF Fabiano Rosas
2025-02-14 20:31 ` [PULL 06/22] migration/multifd: Terminate the TLS connection Fabiano Rosas
2025-02-14 20:31 ` [PULL 07/22] migration/multifd: Add a compat property for TLS termination Fabiano Rosas
2025-02-14 20:31 ` [PULL 08/22] migration: Check migration error after loadvm Fabiano Rosas
2025-02-14 20:31 ` [PULL 09/22] migration: Set migration error outside of migrate_cancel Fabiano Rosas
2025-02-14 20:31 ` [PULL 10/22] migration: Unify migration_cancel and migrate_fd_cancel Fabiano Rosas
2025-02-14 20:31 ` [PULL 11/22] migration: Change migrate_fd_ to migration_ Fabiano Rosas
2025-02-14 20:31 ` [PULL 12/22] migration: Fix hang after error in destination setup phase Fabiano Rosas
2025-02-14 20:31 ` [PULL 13/22] migration: Reject qmp_migrate_cancel after postcopy Fabiano Rosas
2025-02-14 20:31 ` [PULL 14/22] migration: Don't set FAILED state when cancelling Fabiano Rosas
2025-02-14 20:31 ` [PULL 15/22] tests/qtest/migration: Introduce migration_test_add_suffix Fabiano Rosas
2025-02-14 20:31 ` [PULL 16/22] tests/qtest/migration: Add a cancel test Fabiano Rosas
2025-02-14 20:31 ` [PULL 17/22] migration: Update migrate_cancel documentation Fabiano Rosas
2025-02-14 20:31 ` [PULL 18/22] migration: use parameters.mode in cpr_state_save Fabiano Rosas
2025-02-14 20:31 ` [PULL 19/22] guestperf: Support deferred migration for multifd Fabiano Rosas
2025-02-14 20:31 ` [PULL 20/22] guestperf: Nitpick the inconsistent parameters Fabiano Rosas
2025-02-14 20:31 ` [PULL 21/22] guestperf: Introduce multifd compression option Fabiano Rosas
2025-02-14 20:31 ` [PULL 22/22] guestperf: Add test result data into report Fabiano Rosas
2025-02-17  8:25 ` [PULL 00/22] Migration patches for 2025-02-14 Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250214203159.30168-5-farosas@suse.de \
    --to=farosas@suse.de \
    --cc=berrange@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.