[PATCH v3] block: Refactor get_tmp_filename()

2022-09-24 Thread Bin Meng
From: Bin Meng At present there are two callers of get_tmp_filename() and they are inconsistent. One does: /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ char *tmp_filename = g_malloc0(PATH_MAX + 1); ... ret = get_tmp_filename(tmp_filename, PATH_MAX + 1);

[PATCH] block/io_uring: revert "Use io_uring_register_ring_fd() to skip fd operations"

2022-09-24 Thread Sam Li
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

Re: [PATCH 02/26] block: add missing coroutine_fn annotations

2022-09-24 Thread Paolo Bonzini
On Thu, Sep 22, 2022 at 5:12 PM Alberto Campinho Faria wrote: > > On Thu, Sep 22, 2022 at 9:49 AM Paolo Bonzini wrote: > > Callers of coroutine_fn must be coroutine_fn themselves, or the call > > must be within "if (qemu_in_coroutine())". Apply coroutine_fn to > > functions where this holds. >

Re: [PATCH v2] block: Refactor get_tmp_filename()

2022-09-24 Thread Philippe Mathieu-Daudé via
On 24/9/22 13:45, Bin Meng wrote: From: Bin Meng At present there are two callers of get_tmp_filename() and they are inconsistent. One does: /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ char *tmp_filename = g_malloc0(PATH_MAX + 1); ... ret =

[PATCH v2] block: Refactor get_tmp_filename()

2022-09-24 Thread Bin Meng
From: Bin Meng At present there are two callers of get_tmp_filename() and they are inconsistent. One does: /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ char *tmp_filename = g_malloc0(PATH_MAX + 1); ... ret = get_tmp_filename(tmp_filename, PATH_MAX + 1);

Re: [PATCH v2 03/39] block: Unify the get_tmp_filename() implementation

2022-09-24 Thread Bin Meng
On Fri, Sep 23, 2022 at 3:39 AM Marc-André Lureau wrote: > > Hi > > On Tue, Sep 20, 2022 at 2:17 PM Bin Meng wrote: >> >> From: Bin Meng >> >> At present get_tmp_filename() has platform specific implementations >> to get the directory to use for temporary files. Switch over to use >>

[PATCH] block: Refactor get_tmp_filename()

2022-09-24 Thread Bin Meng
From: Bin Meng At present there are two callers of get_tmp_filename() and they are inconsistent. One does: /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ char *tmp_filename = g_malloc0(PATH_MAX + 1); ... ret = get_tmp_filename(tmp_filename, PATH_MAX + 1);