
On 04.04.2015 00:49, Jim Fehlig wrote:
Let callers of libxlDomainStart decide when it is appropriate to acquire a job on the associated virDomainObj.
Signed-off-by: Jim Fehlig <jfehlig@suse.com> ---
Job handling in the migration code is currently broken/incomplete, so fixing it is deferred to a follow-up series I'm working on.
src/libxl/libxl_domain.c | 24 ++++++++------------- src/libxl/libxl_driver.c | 55 +++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 54 insertions(+), 25 deletions(-)
diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index 37b2b58..391291d 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -903,16 +903,13 @@ libxlDomainStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
Not to be seen in this chunk, but there's a comment before the function saying that the @vm must be locked. Extend it please to denote the fact callers should acquire a job before calling this function. Not doing so is acceptable only for a few exceptions which are bing fixed later in the series anyway.
libxl_domain_config_init(&d_config);
- if (libxlDomainObjBeginJob(driver, vm, LIBXL_JOB_MODIFY) < 0) - return ret; - cfg = libxlDriverConfigGet(driver); /* If there is a managed saved state restore it instead of starting * from scratch. The old state is removed once the restoring succeeded. */ if (restore_fd < 0) { managed_save_path = libxlDomainManagedSavePath(driver, vm); if (managed_save_path == NULL) - goto endjob; + goto cleanup;
if (virFileExists(managed_save_path)) {
Michal