From: Alberto Faria <afaria@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Denis V. Lunev" <den@openvz.org>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Vladimir Sementsov-Ogievskiy" <v.sementsov-og@mail.ru>,
qemu-block@nongnu.org, "Kevin Wolf" <kwolf@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"John Snow" <jsnow@redhat.com>, "Hanna Reitz" <hreitz@redhat.com>,
"Eric Blake" <eblake@redhat.com>, "Stefan Weil" <sw@weilnetz.de>,
"Jeff Cody" <codyprime@gmail.com>, "Fam Zheng" <fam@euphon.net>,
"Ari Sundholm" <ari@tuxera.com>,
"Alberto Faria" <afaria@redhat.com>
Subject: [PATCH v3 00/10] Implement bdrv_{pread, pwrite, pwrite_sync, pwrite_zeroes}() using generated_co_wrapper
Date: Thu, 19 May 2022 15:48:30 +0100 [thread overview]
Message-ID: <20220519144841.784780-1-afaria@redhat.com> (raw)
Start by making the interfaces of analogous non-coroutine and coroutine
functions consistent with each other, then implement the non-coroutine
ones using generated_co_wrapper.
For the bdrv_pwrite_sync() case, also add the missing
bdrv_co_pwrite_sync() function.
Changes v2 --> v3:
- Add `assert(bytes <= SIZE_MAX)` to bdrv_co_{pread,pwrite}().
Changes v1 --> v2:
- Drop unnecessary assignments to ret in vhdx_log_peek_hdr(),
vhdx_log_read_sectors(), and vhdx_log_write_sectors().
- Simplify vdi_co_pwritev() return expression.
- Add patch making crypto block callbacks return 0 on success.
- Clarify in commit message that bdrv_pwrite_zeroes() now calls
trace_bdrv_co_pwrite_zeroes() and clears the BDRV_REQ_MAY_UNMAP flag
when appropriate, which it didn't previously.
- Use _co_ functions in the implementation of bdrv_co_pwrite_sync().
- Add patch converting uses of bdrv_pwrite_sync() into
bdrv_co_pwrite_sync() when the callers are already coroutine_fn.
- Add patch making qcow2_mark_dirty() use bdrv_pwrite_sync() instead of
calling bdrv_pwrite() and bdrv_flush() separately.
Alberto Faria (10):
block: Add a 'flags' param to bdrv_{pread,pwrite,pwrite_sync}()
block: Change bdrv_{pread,pwrite,pwrite_sync}() param order
block: Make bdrv_{pread,pwrite}() return 0 on success
crypto: Make block callbacks return 0 on success
block: Make bdrv_co_pwrite() take a const buffer
block: Make 'bytes' param of bdrv_co_{pread,pwrite,preadv,pwritev}()
an int64_t
block: Implement bdrv_{pread,pwrite,pwrite_zeroes}() using
generated_co_wrapper
block: Add bdrv_co_pwrite_sync()
block: Use bdrv_co_pwrite_sync() when caller is coroutine_fn
block/qcow2: Use bdrv_pwrite_sync() in qcow2_mark_dirty()
block/blklogwrites.c | 6 +--
block/bochs.c | 10 ++--
block/cloop.c | 12 ++---
block/coroutines.h | 4 +-
block/crypto.c | 56 +++++++++++-----------
block/dmg.c | 36 +++++++-------
block/io.c | 55 ++--------------------
block/parallels-ext.c | 6 +--
block/parallels.c | 12 ++---
block/qcow.c | 41 ++++++++--------
block/qcow2-bitmap.c | 14 +++---
block/qcow2-cache.c | 9 ++--
block/qcow2-cluster.c | 19 ++++----
block/qcow2-refcount.c | 58 ++++++++++++-----------
block/qcow2-snapshot.c | 53 ++++++++++-----------
block/qcow2.c | 80 ++++++++++++++++----------------
block/qed.c | 13 ++----
block/vdi.c | 16 +++----
block/vhdx-log.c | 23 +++++----
block/vhdx.c | 36 +++++++-------
block/vmdk.c | 70 +++++++++++++---------------
block/vpc.c | 23 ++++-----
block/vvfat.c | 11 +++--
crypto/block-luks.c | 8 ++--
crypto/block.c | 6 +--
include/block/block-io.h | 22 ++++++---
include/block/block_int-io.h | 8 +++-
include/crypto/block.h | 32 ++++++-------
tests/unit/test-block-iothread.c | 12 ++---
tests/unit/test-crypto-block.c | 38 +++++++--------
30 files changed, 374 insertions(+), 415 deletions(-)
--
2.35.3
next reply other threads:[~2022-05-19 14:51 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-19 14:48 Alberto Faria [this message]
2022-05-19 14:48 ` [PATCH v3 01/10] block: Add a 'flags' param to bdrv_{pread, pwrite, pwrite_sync}() Alberto Faria
2022-05-26 8:38 ` [PATCH v3 01/10] block: Add a 'flags' param to bdrv_{pread,pwrite,pwrite_sync}() Stefan Hajnoczi
2022-05-27 10:02 ` Vladimir Sementsov-Ogievskiy
2022-05-19 14:48 ` [PATCH v3 02/10] block: Change bdrv_{pread, pwrite, pwrite_sync}() param order Alberto Faria
2022-05-26 8:41 ` Stefan Hajnoczi
2022-05-27 14:44 ` Vladimir Sementsov-Ogievskiy
2022-05-19 14:48 ` [PATCH v3 03/10] block: Make bdrv_{pread, pwrite}() return 0 on success Alberto Faria
2022-05-26 8:49 ` [PATCH v3 03/10] block: Make bdrv_{pread,pwrite}() " Stefan Hajnoczi
2022-05-26 8:53 ` Daniel P. Berrangé
2022-05-26 8:50 ` Stefan Hajnoczi
2022-05-19 14:48 ` [PATCH v3 04/10] crypto: Make block callbacks " Alberto Faria
2022-05-26 8:49 ` Stefan Hajnoczi
2022-05-19 14:48 ` [PATCH v3 05/10] block: Make bdrv_co_pwrite() take a const buffer Alberto Faria
2022-05-26 8:51 ` Stefan Hajnoczi
2022-05-19 14:48 ` [PATCH v3 06/10] block: Make 'bytes' param of bdrv_co_{pread, pwrite, preadv, pwritev}() an int64_t Alberto Faria
2022-05-24 21:14 ` [PATCH v3 06/10] block: Make 'bytes' param of bdrv_co_{pread,pwrite,preadv,pwritev}() " Eric Blake
2022-05-26 9:00 ` Stefan Hajnoczi
2022-05-26 11:05 ` [PATCH v3 06/10] block: Make 'bytes' param of bdrv_co_{pread, pwrite, preadv, pwritev}() " Alberto Faria
2022-05-27 14:23 ` [PATCH v3 06/10] block: Make 'bytes' param of bdrv_co_{pread,pwrite,preadv,pwritev}() " Eric Blake
2022-05-19 14:48 ` [PATCH v3 07/10] block: Implement bdrv_{pread, pwrite, pwrite_zeroes}() using generated_co_wrapper Alberto Faria
2022-05-26 8:55 ` [PATCH v3 07/10] block: Implement bdrv_{pread,pwrite,pwrite_zeroes}() " Stefan Hajnoczi
2022-05-26 19:23 ` [PATCH v3 07/10] block: Implement bdrv_{pread, pwrite, pwrite_zeroes}() " Alberto Faria
2022-05-27 14:25 ` [PATCH v3 07/10] block: Implement bdrv_{pread,pwrite,pwrite_zeroes}() " Eric Blake
2022-05-30 12:49 ` Stefan Hajnoczi
2022-06-06 16:10 ` [PATCH v3 07/10] block: Implement bdrv_{pread, pwrite, pwrite_zeroes}() " Alberto Faria
2022-06-08 12:50 ` [PATCH v3 07/10] block: Implement bdrv_{pread,pwrite,pwrite_zeroes}() " Stefan Hajnoczi
2022-06-09 15:13 ` [PATCH v3 07/10] block: Implement bdrv_{pread, pwrite, pwrite_zeroes}() " Alberto Faria
2022-05-30 12:56 ` [PATCH v3 07/10] block: Implement bdrv_{pread,pwrite,pwrite_zeroes}() " Stefan Hajnoczi
2022-05-30 13:02 ` Stefan Hajnoczi
2022-05-19 14:48 ` [PATCH v3 08/10] block: Add bdrv_co_pwrite_sync() Alberto Faria
2022-05-26 8:57 ` Stefan Hajnoczi
2022-05-19 14:48 ` [PATCH v3 09/10] block: Use bdrv_co_pwrite_sync() when caller is coroutine_fn Alberto Faria
2022-05-26 9:01 ` Stefan Hajnoczi
2022-05-19 14:48 ` [PATCH v3 10/10] block/qcow2: Use bdrv_pwrite_sync() in qcow2_mark_dirty() Alberto Faria
2022-05-26 9:01 ` Stefan Hajnoczi
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=20220519144841.784780-1-afaria@redhat.com \
--to=afaria@redhat.com \
--cc=ari@tuxera.com \
--cc=berrange@redhat.com \
--cc=codyprime@gmail.com \
--cc=den@openvz.org \
--cc=eblake@redhat.com \
--cc=fam@euphon.net \
--cc=hreitz@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=sw@weilnetz.de \
--cc=v.sementsov-og@mail.ru \
/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).