block/io_uring: revert "Use io_uring_register_ring_fd() to skip fd operations"
commit7845e731471365663dea8e34338f93791d31ea44
authorSam Li <faithilikerun@gmail.com>
Sat, 24 Sep 2022 14:48:15 +0000 (24 22:48 +0800)
committerKevin Wolf <kwolf@redhat.com>
Thu, 27 Oct 2022 18:14:11 +0000 (27 20:14 +0200)
treec33cc0445a97d87d2fb0729d948a8b20cbfc1331
parent1e85c7259b7f5b5b7f9a360e2327b1baff723c79
block/io_uring: revert "Use io_uring_register_ring_fd() to skip fd operations"

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1193

The commit "Use io_uring_register_ring_fd() to skip fd operations" broke
when booting a guest with iothread and io_uring. That is because the
io_uring_register_ring_fd() call is made from the main thread instead of
IOThread where io_uring_submit() is called. It can not be guaranteed
to register the ring fd in the correct thread or unregister the same ring
fd if the IOThread is disabled. This optimization is not critical so we
will revert previous commit.

This reverts commit e2848bc574fe2715c694bf8fe9a1ba7f78a1125a
and 77e3f038af1764983087e3551a0fde9951952c4d.

Cc: qemu-stable@nongnu.org
Signed-off-by: Sam Li <faithilikerun@gmail.com>
Message-Id: <20220924144815.5591-1-faithilikerun@gmail.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Tested-by: Dario Faggioli <dfaggioli@suse.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/io_uring.c
meson.build