job: Maintain a list of all jobs

This moves the job list from BlockJob to Job. Now we can check for
duplicate IDs in job_create().

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
This commit is contained in:
Kevin Wolf 2018-04-12 17:54:37 +02:00
parent fd61a701f1
commit e7c1d78bbd
4 changed files with 74 additions and 25 deletions

View file

@ -105,9 +105,6 @@ typedef struct BlockJob {
*/
bool deferred_to_main_loop;
/** Element of the list of block jobs */
QLIST_ENTRY(BlockJob) job_list;
/** Status that is published by the query-block-jobs QMP API */
BlockDeviceIoStatus iostatus;