diff options
author | Fiona Ebner <f.ebner@proxmox.com> | 2023-10-31 14:54:29 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2023-10-31 18:20:29 +0100 |
commit | 59fd82544dea5042deb02c26f61d6f39bd187c02 (patch) | |
tree | 68c427e5671ba75320c2f1d8d4fcf04b48de4816 /blockjob.c | |
parent | 701efc9f2d68707e20eb6f1f9e7781aa639cf0cb (diff) |
blockjob: query driver-specific info via a new 'query' driver method
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Message-ID: <20231031135431.393137-9-f.ebner@proxmox.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockjob.c')
-rw-r--r-- | blockjob.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/blockjob.c b/blockjob.c index 5b4786a70f..5b24de356d 100644 --- a/blockjob.c +++ b/blockjob.c @@ -378,6 +378,7 @@ BlockJobInfo *block_job_query_locked(BlockJob *job, Error **errp) { BlockJobInfo *info; uint64_t progress_current, progress_total; + const BlockJobDriver *drv = block_job_driver(job); GLOBAL_STATE_CODE(); @@ -407,6 +408,11 @@ BlockJobInfo *block_job_query_locked(BlockJob *job, Error **errp) g_strdup(error_get_pretty(job->job.err)) : g_strdup(strerror(-job->job.ret)); } + if (drv->query) { + job_unlock(); + drv->query(job, info); + job_lock(); + } return info; } |