From: Max Reitz <mreitz@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Cc: jcody@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] file-posix: Make .bdrv_co_truncate asynchronous
Date: Mon, 25 Jun 2018 16:24:49 +0200 [thread overview]
Message-ID: <c206c1db-0fb4-0297-8b41-51d89235d8d0@redhat.com> (raw)
In-Reply-To: <20180621170657.27542-3-kwolf@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1500 bytes --]
On 2018-06-21 19:06, Kevin Wolf wrote:
> This moves the code to resize an image file to the thread pool to avoid
> blocking.
>
> Creating large images with preallocation with blockdev-create is now
> actually a background job instead of blocking the monitor (and most
> other things) until the preallocation has completed.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> include/block/raw-aio.h | 4 +-
> block/file-posix.c | 265 +++++++++++++++++++++++++++---------------------
> 2 files changed, 153 insertions(+), 116 deletions(-)
[...]
> diff --git a/block/file-posix.c b/block/file-posix.c
> index 6223a8bccc..fa918f2bdb 100644
> --- a/block/file-posix.c
> +++ b/block/file-posix.c
> @@ -188,8 +188,16 @@ typedef struct RawPosixAIOData {
> #define aio_ioctl_cmd aio_nbytes /* for QEMU_AIO_IOCTL */
> off_t aio_offset;
> int aio_type;
> - int aio_fd2;
> - off_t aio_offset2;
> + union {
> + struct {
> + int aio_fd2;
> + off_t aio_offset2;
> + };
> + struct {
> + PreallocMode prealloc;
> + Error **errp;
> + };
> + };
Comments might help (that the first struct is for *_COPY_RANGE and the
second one is for *_TRUNCATE).
But in general (without having actual knowledge of file-posix's AIO pool):
Reviewed-by: Max Reitz <mreitz@redhat.com>
> } RawPosixAIOData;
>
> #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2018-06-25 14:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-21 17:06 [Qemu-devel] [PATCH 0/2] file-posix: Make truncate/preallocate asynchronous Kevin Wolf
2018-06-21 17:06 ` [Qemu-devel] [PATCH 1/2] block: Convert .bdrv_truncate callback to coroutine_fn Kevin Wolf
2018-06-25 9:02 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2018-06-25 9:51 ` Kevin Wolf
2018-06-25 14:15 ` Max Reitz
2018-06-21 17:06 ` [Qemu-devel] [PATCH 2/2] file-posix: Make .bdrv_co_truncate asynchronous Kevin Wolf
2018-06-25 8:56 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2018-06-25 9:18 ` Kevin Wolf
2018-06-25 14:24 ` Max Reitz [this message]
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=c206c1db-0fb4-0297-8b41-51d89235d8d0@redhat.com \
--to=mreitz@redhat.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--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 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).