qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Emanuele Giuseppe Esposito
Subject: [PATCH v2 0/3] job: split job API in driver and monitor
Date: Tue, 8 Feb 2022 09:39:52 -0500

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: <20220208143513.1077229-1-eesposit@redhat.com>
---
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

-- 
2.31.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]