[PATCH 0/5] block layer: permission API refactoring in preparation

Emanuele Giuseppe Esposito posted 5 patches 3 years, 12 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220209105452.1694545-1-eesposit@redhat.com
Maintainers: Hanna Reitz <hreitz@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Greg Kurz <groug@kaod.org>, "Cédric Le Goater" <clg@kaod.org>, Kevin Wolf <kwolf@redhat.com>, Fam Zheng <fam@euphon.net>, Daniel Henrique Barboza <danielhb413@gmail.com>, Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>, Markus Armbruster <armbru@redhat.com>, Juan Quintela <quintela@redhat.com>, David Gibson <david@gibson.dropbear.id.au>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, "Denis V. Lunev" <den@openvz.org>
block.c                          | 38 +++++++++++++-------
block/amend.c                    | 24 +++++++++++++
block/block-backend.c            |  4 +--
block/crypto.c                   | 62 +++++++++++++++++++++-----------
block/export/export.c            |  2 +-
block/parallels.c                |  2 +-
hw/block/pflash_cfi01.c          |  2 +-
hw/nvram/spapr_nvram.c           |  2 +-
include/block/block.h            |  3 +-
include/block/block_int.h        | 14 ++++++++
include/sysemu/block-backend.h   |  2 +-
migration/block.c                |  2 +-
migration/migration.c            | 14 ++++----
migration/savevm.c               |  6 ++--
monitor/qmp-cmds.c               |  2 +-
tests/unit/test-block-iothread.c |  8 ++---
16 files changed, 131 insertions(+), 56 deletions(-)
[PATCH 0/5] block layer: permission API refactoring in preparation
Posted by Emanuele Giuseppe Esposito 3 years, 12 months ago
This serie aims to refactoring and fixing permission API related bugs that came
up in the serie "block layer: split block APIs in global state and I/O".
In that serie, we are splitting all block layer headers in
Global State (GS) APIs, holding always the BQL and running in the
main loop, and I/O running in iothreads.

The patches in this serie are taken from v6 of the API split,
to reduce its size and apply these fixes independently.

Patches 1 and 2 take care of crypto and amend jobs, since they
incorrectly use the permission API also in iothreads.
Patches 3-4-5 take care of bdrv_invalidate_cache and callers,
since this function checks too for permisisons while being
called by an iothread.

Emanuele Giuseppe Esposito (5):
  crypto: perform permission checks under BQL
  crypto: distinguish between main loop and I/O in
    block_crypto_amend_options_generic_luks
  block: introduce bdrv_activate
  block: rename bdrv_invalidate_cache_all, blk_invalidate_cache and
    test_sync_op_invalidate_cache
  block: move BQL logic of bdrv_co_invalidate_cache in bdrv_activate

 block.c                          | 38 +++++++++++++-------
 block/amend.c                    | 24 +++++++++++++
 block/block-backend.c            |  4 +--
 block/crypto.c                   | 62 +++++++++++++++++++++-----------
 block/export/export.c            |  2 +-
 block/parallels.c                |  2 +-
 hw/block/pflash_cfi01.c          |  2 +-
 hw/nvram/spapr_nvram.c           |  2 +-
 include/block/block.h            |  3 +-
 include/block/block_int.h        | 14 ++++++++
 include/sysemu/block-backend.h   |  2 +-
 migration/block.c                |  2 +-
 migration/migration.c            | 14 ++++----
 migration/savevm.c               |  6 ++--
 monitor/qmp-cmds.c               |  2 +-
 tests/unit/test-block-iothread.c |  8 ++---
 16 files changed, 131 insertions(+), 56 deletions(-)

-- 
2.31.1


Re: [PATCH 0/5] block layer: permission API refactoring in preparation
Posted by Kevin Wolf 3 years, 11 months ago
Am 09.02.2022 um 11:54 hat Emanuele Giuseppe Esposito geschrieben:
> This serie aims to refactoring and fixing permission API related bugs that came
> up in the serie "block layer: split block APIs in global state and I/O".
> In that serie, we are splitting all block layer headers in
> Global State (GS) APIs, holding always the BQL and running in the
> main loop, and I/O running in iothreads.
> 
> The patches in this serie are taken from v6 of the API split,
> to reduce its size and apply these fixes independently.
> 
> Patches 1 and 2 take care of crypto and amend jobs, since they
> incorrectly use the permission API also in iothreads.
> Patches 3-4-5 take care of bdrv_invalidate_cache and callers,
> since this function checks too for permisisons while being
> called by an iothread.

Thanks, applied to the block branch.

Kevin