diff options
author | Kevin Wolf <kwolf@redhat.com> | 2018-04-19 17:54:56 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-05-23 14:30:50 +0200 |
commit | bb02b65c7d57e4f2136f39bfba95cc68d89eb216 (patch) | |
tree | 1df5ac17eb38186457e82995d6cccab1e90210f4 /blockdev.c | |
parent | dbe5e6c1f73b41282624b78a2375a5c3ee59e905 (diff) |
job: Move BlockJobCreateFlags to Job
This renames the BlockJobCreateFlags constants, moves a few JOB_INTERNAL
checks to job_create() and the auto_{finalize,dismiss} fields from
BlockJob to Job.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r-- | blockdev.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/blockdev.c b/blockdev.c index 3533c0dd6a..278b92ce03 100644 --- a/blockdev.c +++ b/blockdev.c @@ -3244,7 +3244,7 @@ void qmp_block_commit(bool has_job_id, const char *job_id, const char *device, goto out; } commit_active_start(has_job_id ? job_id : NULL, bs, base_bs, - BLOCK_JOB_DEFAULT, speed, on_error, + JOB_DEFAULT, speed, on_error, filter_node_name, NULL, NULL, false, &local_err); } else { BlockDriverState *overlay_bs = bdrv_find_overlay(bs, top_bs); @@ -3275,7 +3275,7 @@ static BlockJob *do_drive_backup(DriveBackup *backup, BlockJobTxn *txn, AioContext *aio_context; QDict *options = NULL; Error *local_err = NULL; - int flags, job_flags = BLOCK_JOB_DEFAULT; + int flags, job_flags = JOB_DEFAULT; int64_t size; bool set_backing_hd = false; @@ -3398,10 +3398,10 @@ static BlockJob *do_drive_backup(DriveBackup *backup, BlockJobTxn *txn, } } if (!backup->auto_finalize) { - job_flags |= BLOCK_JOB_MANUAL_FINALIZE; + job_flags |= JOB_MANUAL_FINALIZE; } if (!backup->auto_dismiss) { - job_flags |= BLOCK_JOB_MANUAL_DISMISS; + job_flags |= JOB_MANUAL_DISMISS; } job = backup_job_create(backup->job_id, bs, target_bs, backup->speed, @@ -3442,7 +3442,7 @@ BlockJob *do_blockdev_backup(BlockdevBackup *backup, BlockJobTxn *txn, Error *local_err = NULL; AioContext *aio_context; BlockJob *job = NULL; - int job_flags = BLOCK_JOB_DEFAULT; + int job_flags = JOB_DEFAULT; if (!backup->has_speed) { backup->speed = 0; @@ -3491,10 +3491,10 @@ BlockJob *do_blockdev_backup(BlockdevBackup *backup, BlockJobTxn *txn, } } if (!backup->auto_finalize) { - job_flags |= BLOCK_JOB_MANUAL_FINALIZE; + job_flags |= JOB_MANUAL_FINALIZE; } if (!backup->auto_dismiss) { - job_flags |= BLOCK_JOB_MANUAL_DISMISS; + job_flags |= JOB_MANUAL_DISMISS; } job = backup_job_create(backup->job_id, bs, target_bs, backup->speed, backup->sync, NULL, backup->compress, |