]> git.ipfire.org Git - thirdparty/qemu.git/commit - blockjob.c
blockjob: Pause job on draining any job BDS
authorKevin Wolf <kwolf@redhat.com>
Tue, 12 Dec 2017 18:04:28 +0000 (19:04 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 22 Dec 2017 14:05:32 +0000 (15:05 +0100)
commitad90febaf22d95e49fb6821bfb3ebd05b4919417
treed0a571e02956d9b75b25f8a7d6964b88fcae0616
parent89a6ceab4617fefa5ace6a46be3e2be58925ae71
blockjob: Pause job on draining any job BDS

Block jobs already paused themselves when their main BlockBackend
entered a drained section. This is not good enough: We also want to
pause a block job and may not submit new requests if, for example, the
mirror target node should be drained.

This implements .drained_begin/end callbacks in child_job in order to
consider all block nodes related to the job, and removes the
BlockBackend callbacks which are unnecessary now because the root of the
job main BlockBackend is always referenced with a child_job, too.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blockjob.c