qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] file-posix: Make truncate/preallocate asynchronous
@ 2018-06-21 17:06 Kevin Wolf
  2018-06-21 17:06 ` [Qemu-devel] [PATCH 1/2] block: Convert .bdrv_truncate callback to coroutine_fn Kevin Wolf
  2018-06-21 17:06 ` [Qemu-devel] [PATCH 2/2] file-posix: Make .bdrv_co_truncate asynchronous Kevin Wolf
  0 siblings, 2 replies; 9+ messages in thread
From: Kevin Wolf @ 2018-06-21 17:06 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, mreitz, jcody, qemu-devel

This fixes the problem that blockdev-create on a local file blocks the
main loop despite being a background job. This was caused by file-posix
preallocating the image with blocking syscalls rather than moving this
to the thread pool and yielding the coroutine meanwhile.

Kevin Wolf (2):
  block: Convert .bdrv_truncate callback to coroutine_fn
  file-posix: Make .bdrv_co_truncate asynchronous

 include/block/block.h     |   4 +
 include/block/block_int.h |   4 +-
 include/block/raw-aio.h   |   4 +-
 block.c                   |  49 +++++++-
 block/copy-on-read.c      |   8 +-
 block/crypto.c            |   9 +-
 block/file-posix.c        | 277 ++++++++++++++++++++++++++--------------------
 block/file-win32.c        |   6 +-
 block/gluster.c           |  14 ++-
 block/iscsi.c             |   8 +-
 block/nfs.c               |   7 +-
 block/qcow2.c             |  14 +--
 block/qed.c               |   8 +-
 block/raw-format.c        |   8 +-
 block/rbd.c               |   8 +-
 block/sheepdog.c          |  12 +-
 block/ssh.c               |   6 +-
 17 files changed, 267 insertions(+), 179 deletions(-)

-- 
2.13.6

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-06-25 14:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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   ` [Qemu-devel] " Max Reitz

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).