[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v7 16/31] GS and IO CODE macros for blockjob_int.h
From: |
Emanuele Giuseppe Esposito |
Subject: |
[PATCH v7 16/31] GS and IO CODE macros for blockjob_int.h |
Date: |
Fri, 11 Feb 2022 09:51:38 -0500 |
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@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.31.1
- [PATCH v7 00/31] block layer: split block APIs in global state and I/O, Emanuele Giuseppe Esposito, 2022/02/11
- [PATCH v7 01/31] main-loop.h: introduce qemu_in_main_thread(), Emanuele Giuseppe Esposito, 2022/02/11
- [PATCH v7 02/31] main loop: macros to mark GS and I/O functions, Emanuele Giuseppe Esposito, 2022/02/11
- [PATCH v7 12/31] assertions for block_int global state API, Emanuele Giuseppe Esposito, 2022/02/11
- [PATCH v7 15/31] include/block/blockjob_int.h: split header into I/O and GS API, Emanuele Giuseppe Esposito, 2022/02/11
- [PATCH v7 16/31] GS and IO CODE macros for blockjob_int.h,
Emanuele Giuseppe Esposito <=
- [PATCH v7 10/31] block.c: assertions to the block layer permissions API, Emanuele Giuseppe Esposito, 2022/02/11
- [PATCH v7 07/31] include/sysemu/block-backend: split header into I/O and global state (GS) API, Emanuele Giuseppe Esposito, 2022/02/11
- [PATCH v7 06/31] block/export/fuse.c: allow writable exports to take RESIZE permission, Emanuele Giuseppe Esposito, 2022/02/11
- [PATCH v7 04/31] assertions for block global state API, Emanuele Giuseppe Esposito, 2022/02/11
- [PATCH v7 08/31] block/block-backend.c: assertions for block-backend, Emanuele Giuseppe Esposito, 2022/02/11
- [PATCH v7 05/31] IO_CODE and IO_OR_GS_CODE for block I/O API, Emanuele Giuseppe Esposito, 2022/02/11
- [PATCH v7 13/31] IO_CODE and IO_OR_GS_CODE for block_int I/O API, Emanuele Giuseppe Esposito, 2022/02/11
- [PATCH v7 20/31] include/sysemu/blockdev.h: global state API, Emanuele Giuseppe Esposito, 2022/02/11
- [PATCH v7 21/31] assertions for blockdev.h global state API, Emanuele Giuseppe Esposito, 2022/02/11
- [PATCH v7 26/31] block_int-common.h: assertions in the callers of BlockDriver function pointers, Emanuele Giuseppe Esposito, 2022/02/11