block/amend: Always call .bdrv_amend_clean()
.bdrv_amend_clean() says block drivers can use it to clean up what was done in .bdrv_amend_pre_run(). Therefore, it should always be called after .bdrv_amend_pre_run(), which means we need it to call it in the JobDriver.free() callback, not in JobDriver.clean(). Signed-off-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220304153729.711387-3-hreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
9086c76398
commit
b8ba60067b
@ -62,7 +62,7 @@ static int blockdev_amend_pre_run(BlockdevAmendJob *s, Error **errp)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void blockdev_amend_clean(Job *job)
|
static void blockdev_amend_free(Job *job)
|
||||||
{
|
{
|
||||||
BlockdevAmendJob *s = container_of(job, BlockdevAmendJob, common);
|
BlockdevAmendJob *s = container_of(job, BlockdevAmendJob, common);
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ static const JobDriver blockdev_amend_job_driver = {
|
|||||||
.instance_size = sizeof(BlockdevAmendJob),
|
.instance_size = sizeof(BlockdevAmendJob),
|
||||||
.job_type = JOB_TYPE_AMEND,
|
.job_type = JOB_TYPE_AMEND,
|
||||||
.run = blockdev_amend_run,
|
.run = blockdev_amend_run,
|
||||||
.clean = blockdev_amend_clean,
|
.free = blockdev_amend_free,
|
||||||
};
|
};
|
||||||
|
|
||||||
void qmp_x_blockdev_amend(const char *job_id,
|
void qmp_x_blockdev_amend(const char *job_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user