[PATCH v3 00/26] block: fix coroutine_fn annotations

Paolo Bonzini posted 26 patches 6 days, 19 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220922084924.201610-1-pbonzini@redhat.com
Maintainers: Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, John Snow <jsnow@redhat.com>, Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>, Fam Zheng <fam@euphon.net>, Ronnie Sahlberg <ronniesahlberg@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, Peter Lieven <pl@kamp.de>, Eric Blake <eblake@redhat.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, "Denis V. Lunev" <den@openvz.org>, Alberto Garcia <berto@igalia.com>, Greg Kurz <groug@kaod.org>, Christian Schoenebeck <qemu_oss@crudebyte.com>, Juan Quintela <quintela@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>
block.c                     |  6 ++---
block/blkdebug.c            | 14 +++++-----
block/blkverify.c           |  2 +-
block/block-backend.c       | 10 +++----
block/copy-before-write.c   |  8 +++---
block/curl.c                |  2 +-
block/file-posix.c          |  2 +-
block/io.c                  | 22 +++++++--------
block/iscsi.c               |  2 +-
block/nbd.c                 | 10 +++----
block/nfs.c                 |  2 +-
block/nvme.c                | 53 ++++++++++++++++++++++---------------
block/parallels.c           |  5 ++--
block/qcow2-cluster.c       | 18 ++++++-------
block/qcow2-refcount.c      |  6 ++---
block/qcow2.c               |  4 +--
block/qcow2.h               | 18 ++++++-------
block/qed.c                 |  4 +--
block/quorum.c              | 35 ++++++++++++------------
block/raw-format.c          |  2 +-
block/throttle.c            |  2 +-
block/vmdk.c                | 20 +++++++-------
hw/9pfs/9p.h                |  9 ++++---
include/block/nbd.h         |  2 +-
include/qemu/coroutine.h    |  2 +-
include/qemu/job.h          |  2 +-
job.c                       |  2 +-
migration/migration.c       |  3 ++-
tests/unit/test-coroutine.c |  2 +-
util/qemu-coroutine-lock.c  | 14 +++++-----
util/qemu-coroutine.c       |  2 +-
31 files changed, 150 insertions(+), 135 deletions(-)
[PATCH v3 00/26] block: fix coroutine_fn annotations
Posted by Paolo Bonzini 6 days, 19 hours ago
As discussed at KVM Forum 2022, I am reposting this series to
add more coroutine_fn annotations.  Fixing the annotations
enables static analysis of which functions are coroutine-only
and which are mixed (coroutine/non-coroutine).

A lot of the patches are similar to the ones that Marc-André Lureau
wrote back in 2017 (posted at [1]) but due to the changes in the code
it was easier to redo them.

This is a simple rebase of v2 (posted at [2]) with the following changes:
- patch 1 is new
- create_file_fallback_zero_first_sector is now marked as coroutine_fn
- blk_pwrite_zeroes is not a coroutine_fn anymore
- blk_pwrite is not a coroutine_fn anymore
- tracked_request_end is already a coroutine_fn in master
- some changes in commit messages

Paolo

[1] https://patchew.org/QEMU/20170704220346.29244-1-marcandre.lureau@redhat.com/).
[2] https://patchew.org/QEMU/20220509103019.215041-1-pbonzini@redhat.com/

Marc-André Lureau (3):
  9p: add missing coroutine_fn annotations
  migration: add missing coroutine_fn annotations
  test-coroutine: add missing coroutine_fn annotations

Paolo Bonzini (23):
  block/nvme: separate nvme_get_free_req cases for
    coroutine/non-coroutine context
  block: add missing coroutine_fn annotations
  qcow2: remove incorrect coroutine_fn annotations
  nbd: remove incorrect coroutine_fn annotations
  coroutine: remove incorrect coroutine_fn annotations
  blkdebug: add missing coroutine_fn annotations
  blkverify: add missing coroutine_fn annotations
  file-posix: add missing coroutine_fn annotations
  iscsi: add missing coroutine_fn annotations
  nbd: add missing coroutine_fn annotations
  nfs: add missing coroutine_fn annotations
  nvme: add missing coroutine_fn annotations
  parallels: add missing coroutine_fn annotations
  qcow2: add missing coroutine_fn annotations
  copy-before-write: add missing coroutine_fn annotations
  curl: add missing coroutine_fn annotations
  qed: add missing coroutine_fn annotations
  quorum: add missing coroutine_fn annotations
  throttle: add missing coroutine_fn annotations
  vmdk: add missing coroutine_fn annotations
  job: add missing coroutine_fn annotations
  coroutine-lock: add missing coroutine_fn annotations
  raw-format: add missing coroutine_fn annotations

 block.c                     |  6 ++---
 block/blkdebug.c            | 14 +++++-----
 block/blkverify.c           |  2 +-
 block/block-backend.c       | 10 +++----
 block/copy-before-write.c   |  8 +++---
 block/curl.c                |  2 +-
 block/file-posix.c          |  2 +-
 block/io.c                  | 22 +++++++--------
 block/iscsi.c               |  2 +-
 block/nbd.c                 | 10 +++----
 block/nfs.c                 |  2 +-
 block/nvme.c                | 53 ++++++++++++++++++++++---------------
 block/parallels.c           |  5 ++--
 block/qcow2-cluster.c       | 18 ++++++-------
 block/qcow2-refcount.c      |  6 ++---
 block/qcow2.c               |  4 +--
 block/qcow2.h               | 18 ++++++-------
 block/qed.c                 |  4 +--
 block/quorum.c              | 35 ++++++++++++------------
 block/raw-format.c          |  2 +-
 block/throttle.c            |  2 +-
 block/vmdk.c                | 20 +++++++-------
 hw/9pfs/9p.h                |  9 ++++---
 include/block/nbd.h         |  2 +-
 include/qemu/coroutine.h    |  2 +-
 include/qemu/job.h          |  2 +-
 job.c                       |  2 +-
 migration/migration.c       |  3 ++-
 tests/unit/test-coroutine.c |  2 +-
 util/qemu-coroutine-lock.c  | 14 +++++-----
 util/qemu-coroutine.c       |  2 +-
 31 files changed, 150 insertions(+), 135 deletions(-)

-- 
2.37.3