mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 13:35:17 +00:00
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:
parent
e8046532a7
commit
fb2fdba2f0
@ -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),
|
||||||
|
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user