qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Sam Li <faithilikerun@gmail.com>
To: qemu-devel <qemu-devel@nongnu.org>
Cc: Dmitry Fomichev <Dmitry.Fomichev@wdc.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	Damien Le Moal <Damien.LeMoal@wdc.com>,
	Sam Li <faithilikerun@gmail.com>, Hannes Reinecke <hare@suse.de>
Subject: [PATCH 2/2] Use io_ring_register_ring_fd() to skip fd operations
Date: Mon, 18 Apr 2022 17:05:04 +0800	[thread overview]
Message-ID: <20220418090504.50107-1-faithilikerun@gmail.com> (raw)

fix code style issue.

Signed-off-by: Sam Li <faithilikerun@gmail.com>
---
 block/io_uring.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/block/io_uring.c b/block/io_uring.c
index 2942967126..57745ecfa1 100644
--- a/block/io_uring.c
+++ b/block/io_uring.c
@@ -436,10 +436,15 @@ LuringState *luring_init(Error **errp)
 
     ioq_init(&s->io_q);
     if (io_uring_register_ring_fd(&s->ring) < 0) {
-        error_setg_errno(errp, errno, "failed to register linux io_uring ring file descriptor");
+        /*
+         * If the function fails, it will fallback to the non-optimized io_uring
+         * operations.
+         */
+        error_setg_errno(errp, errno,
+                         "failed to register linux io_uring ring file descriptor");
     }
-    return s;
 
+    return s;
 }
 
 void luring_cleanup(LuringState *s)
-- 
2.35.1



             reply	other threads:[~2022-04-18  9:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-18  9:05 Sam Li [this message]
2022-04-18 22:24 ` [PATCH 2/2] Use io_ring_register_ring_fd() to skip fd operations Damien Le Moal
2022-04-18 23:36   ` olc

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=20220418090504.50107-1-faithilikerun@gmail.com \
    --to=faithilikerun@gmail.com \
    --cc=Damien.LeMoal@wdc.com \
    --cc=Dmitry.Fomichev@wdc.com \
    --cc=hare@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).