LXC: use virDomainJobObj

This patch replaces struct virLXCDomainJobObj with generalized
virDomainJobObj.

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Kristina Hanicova 2022-07-19 15:48:22 +02:00 committed by Michal Privoznik
parent e8046532a7
commit fb2fdba2f0
2 changed files with 3 additions and 10 deletions

View File

@ -49,7 +49,7 @@ virLXCDomainObjInitJob(virLXCDomainObjPrivate *priv)
static void static void
virLXCDomainObjResetJob(virLXCDomainObjPrivate *priv) virLXCDomainObjResetJob(virLXCDomainObjPrivate *priv)
{ {
struct virLXCDomainJobObj *job = &priv->job; virDomainJobObj *job = &priv->job;
job->active = VIR_JOB_NONE; job->active = VIR_JOB_NONE;
job->owner = 0; job->owner = 0;
@ -103,7 +103,7 @@ virLXCDomainObjBeginJob(virLXCDriver *driver G_GNUC_UNUSED,
error: error:
VIR_WARN("Cannot start job (%s) for domain %s;" VIR_WARN("Cannot start job (%s) for domain %s;"
" current job is (%s) owned by (%d)", " current job is (%s) owned by (%llu)",
virDomainJobTypeToString(job), virDomainJobTypeToString(job),
obj->def->name, obj->def->name,
virDomainJobTypeToString(priv->job.active), virDomainJobTypeToString(priv->job.active),

View File

@ -54,13 +54,6 @@ struct _lxcDomainDef {
}; };
struct virLXCDomainJobObj {
virCond cond; /* Use to coordinate jobs */
virDomainJob active; /* Currently running job */
int owner; /* Thread which set current job */
};
typedef struct _virLXCDomainObjPrivate virLXCDomainObjPrivate; typedef struct _virLXCDomainObjPrivate virLXCDomainObjPrivate;
struct _virLXCDomainObjPrivate { struct _virLXCDomainObjPrivate {
virLXCDriver *driver; virLXCDriver *driver;
@ -74,7 +67,7 @@ struct _virLXCDomainObjPrivate {
virCgroup *cgroup; virCgroup *cgroup;
char *machineName; char *machineName;
struct virLXCDomainJobObj job; virDomainJobObj job;
}; };
extern virXMLNamespace virLXCDriverDomainXMLNamespace; extern virXMLNamespace virLXCDriverDomainXMLNamespace;