Skip to content

job: split job API in driver and monitor

Emanuele Giuseppe Esposito qemu-devel 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 0 repliesNew
  2. v1 RFC3 patches 0 repliesSuperseded

Changes in v2 from the cover letter

* rebased on new version of job_api

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3jobs: add job-common.hinclude/qemu/job-common.h include/qemu/job.h+358 -3270 replies
2/3jobs: add job-monitor.hinclude/qemu/job-monitor.h include/qemu/job.h job.c+251 -2030 replies
3/3jobs: add job-driver.hinclude/qemu/job-driver.h include/qemu/job.h job.c+215 -1660 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] job: split job API in driver and monitor

In this series, we split the job API in two headers:
job-driver.h and job-monitor.h.
As explained in job.c, job-monitor are the functions mainly used by the monitor, and require consistency between the search of a specific job (job_get) and the actual operation/action on it (e.g. job_user_cancel). Therefore job-monitor API assume that the job mutex lock is always held by the caller.

job-driver, on the other side, is the collection of functions that are used by the job drivers or core block layer. These functions are not aware of the job mutex, and delegate the locking to the callee instead.

We also have job-common.h contains the job struct definition and common functions that are not part of monitor or driver APIs. job.h is left for legacy and to avoid changing all files that include it.

This serie is based on my previous series "job: replace AioContext lock with job_mutex".

Based-on: <[email protected]>
---
v2:
* rebased on new version of job_api

Emanuele Giuseppe Esposito (3):
jobs: add job-common.h
jobs: add job-monitor.h
jobs: add job-driver.h

 include/qemu/job-common.h  | 357 +++++++++++++++++++
 include/qemu/job-driver.h  | 211 +++++++++++
 include/qemu/job-monitor.h | 249 +++++++++++++
 include/qemu/job.h         | 697 +------------------------------------
 job.c                      |   4 +-
 5 files changed, 823 insertions(+), 695 deletions(-)
 create mode 100644 include/qemu/job-common.h
 create mode 100644 include/qemu/job-driver.h
 create mode 100644 include/qemu/job-monitor.h
Signature · 1 line
2.31.1