[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 29/50] GS and IO CODE macros for blockjob_int.h
From: |
Kevin Wolf |
Subject: |
[PULL 29/50] GS and IO CODE macros for blockjob_int.h |
Date: |
Fri, 4 Mar 2022 17:46:50 +0100 |
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20220303151616.325444-17-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
blockjob.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/blockjob.c b/blockjob.c
index 10815a89fe..d79a52d204 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -84,6 +84,7 @@ BlockJob *block_job_get(const char *id)
void block_job_free(Job *job)
{
BlockJob *bjob = container_of(job, BlockJob, job);
+ GLOBAL_STATE_CODE();
block_job_remove_all_bdrv(bjob);
ratelimit_destroy(&bjob->limit);
@@ -299,6 +300,7 @@ bool block_job_set_speed(BlockJob *job, int64_t speed,
Error **errp)
int64_t block_job_ratelimit_get_delay(BlockJob *job, uint64_t n)
{
+ IO_CODE();
return ratelimit_calculate_delay(&job->limit, n);
}
@@ -434,6 +436,7 @@ void *block_job_create(const char *job_id, const
BlockJobDriver *driver,
{
BlockJob *job;
int ret;
+ GLOBAL_STATE_CODE();
if (job_id == NULL && !(flags & JOB_INTERNAL)) {
job_id = bdrv_get_device_name(bs);
@@ -498,6 +501,7 @@ void block_job_iostatus_reset(BlockJob *job)
void block_job_user_resume(Job *job)
{
BlockJob *bjob = container_of(job, BlockJob, job);
+ GLOBAL_STATE_CODE();
block_job_iostatus_reset(bjob);
}
@@ -505,6 +509,7 @@ BlockErrorAction block_job_error_action(BlockJob *job,
BlockdevOnError on_err,
int is_read, int error)
{
BlockErrorAction action;
+ IO_CODE();
switch (on_err) {
case BLOCKDEV_ON_ERROR_ENOSPC:
--
2.35.1
[PULL 23/50] block.c: assertions to the block layer permissions API, Kevin Wolf, 2022/03/04
[PULL 22/50] IO_CODE and IO_OR_GS_CODE for block-backend I/O API, Kevin Wolf, 2022/03/04
[PULL 25/50] assertions for block_int global state API, Kevin Wolf, 2022/03/04
[PULL 24/50] include/block/block_int: split header into I/O and global state API, Kevin Wolf, 2022/03/04
[PULL 26/50] IO_CODE and IO_OR_GS_CODE for block_int I/O API, Kevin Wolf, 2022/03/04
[PULL 28/50] include/block/blockjob_int.h: split header into I/O and GS API, Kevin Wolf, 2022/03/04
[PULL 29/50] GS and IO CODE macros for blockjob_int.h,
Kevin Wolf <=
[PULL 31/50] include/block/blockjob.h: global state API, Kevin Wolf, 2022/03/04
[PULL 30/50] block.c: add assertions to static functions, Kevin Wolf, 2022/03/04
[PULL 36/50] block/copy-before-write.h: global state API + assertions, Kevin Wolf, 2022/03/04
[PULL 37/50] block/coroutines: I/O and "I/O or GS" API, Kevin Wolf, 2022/03/04
[PULL 38/50] block_int-common.h: split function pointers in BlockDriver, Kevin Wolf, 2022/03/04
[PULL 39/50] block_int-common.h: assertions in the callers of BlockDriver function pointers, Kevin Wolf, 2022/03/04
[PULL 41/50] block_int-common.h: assertions in the callers of BdrvChildClass function pointers, Kevin Wolf, 2022/03/04
[PULL 42/50] block-backend-common.h: split function pointers in BlockDevOps, Kevin Wolf, 2022/03/04
[PULL 44/50] job.h: assertions in the callers of JobDriver function pointers, Kevin Wolf, 2022/03/04
[PULL 40/50] block_int-common.h: split function pointers in BdrvChildClass, Kevin Wolf, 2022/03/04