[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] aio-posix: fix build failure io_uring 2.2
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v2] aio-posix: fix build failure io_uring 2.2 |
Date: |
Tue, 22 Feb 2022 09:02:20 +0000 |
On Tue, Feb 22, 2022 at 12:24:01AM +0800, Haiyue Wang wrote:
> The io_uring fixed "Don't truncate addr fields to 32-bit on 32-bit":
> https://git.kernel.dk/cgit/liburing/commit/?id=d84c29b19ed0b130000619cff40141bb1fc3615b
>
> This leads to build failure:
> ../util/fdmon-io_uring.c: In function ‘add_poll_remove_sqe’:
> ../util/fdmon-io_uring.c:182:36: error: passing argument 2 of
> ‘io_uring_prep_poll_remove’ makes integer from pointer without a cast
> [-Werror=int-conversion]
> 182 | io_uring_prep_poll_remove(sqe, node);
> | ^~~~
> | |
> | AioHandler *
> In file included from /root/io/qemu/include/block/aio.h:18,
> from ../util/aio-posix.h:20,
> from ../util/fdmon-io_uring.c:49:
> /usr/include/liburing.h:415:17: note: expected ‘__u64’ {aka ‘long long
> unsigned int’} but argument is of type ‘AioHandler *’
> 415 | __u64 user_data)
> | ~~~~~~^~~~~~~~~
> cc1: all warnings being treated as errors
>
> Use LIBURING_HAVE_DATA64 to check whether the io_uring supports 64-bit
> variants of the get/set userdata, to convert the paramter to the right
> data type.
>
> Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
> ---
> v2: update the commit log, and change the type cast as io_uring test does.
> ---
> util/fdmon-io_uring.c | 4 ++++
> 1 file changed, 4 insertions(+)
Thanks, applied to my block tree:
https://gitlab.com/stefanha/qemu/commits/block
I will update the patch in my queue if further discussion raises issues.
Stefan
signature.asc
Description: PGP signature