Skip to content

Commit

Permalink
include/sysemu/blockdev.h: global state API
Browse files Browse the repository at this point in the history
blockdev functions run always under the BQL lock.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20220303151616.325444-21-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
esposem authored and kevmw committed Mar 4, 2022
1 parent cf81ae2 commit 7569583
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions include/sysemu/blockdev.h
Expand Up @@ -13,9 +13,6 @@
#include "block/block.h"
#include "qemu/queue.h"

void blockdev_mark_auto_del(BlockBackend *blk);
void blockdev_auto_del(BlockBackend *blk);

typedef enum {
IF_DEFAULT = -1, /* for use with drive_add() only */
/*
Expand All @@ -38,6 +35,16 @@ struct DriveInfo {
QTAILQ_ENTRY(DriveInfo) next;
};

/*
* Global state (GS) API. These functions run under the BQL.
*
* See include/block/block-global-state.h for more information about
* the GS API.
*/

void blockdev_mark_auto_del(BlockBackend *blk);
void blockdev_auto_del(BlockBackend *blk);

DriveInfo *blk_legacy_dinfo(BlockBackend *blk);
DriveInfo *blk_set_legacy_dinfo(BlockBackend *blk, DriveInfo *dinfo);
BlockBackend *blk_by_legacy_dinfo(DriveInfo *dinfo);
Expand Down

0 comments on commit 7569583

Please sign in to comment.