]> git.ipfire.org Git - thirdparty/qemu.git/commit - blockjob.c
block: Add block_job_add_bdrv()
authorAlberto Garcia <berto@igalia.com>
Fri, 28 Oct 2016 07:08:04 +0000 (10:08 +0300)
committerKevin Wolf <kwolf@redhat.com>
Mon, 31 Oct 2016 15:52:38 +0000 (16:52 +0100)
commit23d402d42beb975b97303beb3d9d4f60f4a1a883
tree93d21dba765ab21fd555ea8630d504e48e92964b
parent40840e419be31e6a32e6ea24511c74b389d5e0e4
block: Add block_job_add_bdrv()

When a block job is created on a certain BlockDriverState, operations
are blocked there while the job exists. However, some block jobs may
involve additional BDSs, which must be blocked separately when the job
is created and unblocked manually afterwards.

This patch adds block_job_add_bdrv(), that simplifies this process by
keeping a list of BDSs that are involved in the specified block job.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blockjob.c
include/block/blockjob.h