Branch: refs/heads/master Home: https://github.com/qemu/qemu Commit: 655ae6bb91998a01964759406cb38ef215a6ba5b https://github.com/qemu/qemu/commit/655ae6bb91998a01964759406cb38ef215a6ba5b Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018)
Changed paths: M tests/qemu-iotests/common.rc Log Message: ----------- qemu-iotests: Fix paths for NFS Test cases were trying to use nfs:// URLs as local filenames, which made every test fail for NFS. With TEST_IMG and TEST_IMG_FILE set like for the other protocols, NFS tests can pass again. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Fam Zheng <f...@redhat.com> Commit: 8908b253c4ad5f8874c8d13abec169c696a5cd32 https://github.com/qemu/qemu/commit/8908b253c4ad5f8874c8d13abec169c696a5cd32 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M tests/qemu-iotests/126.out M tests/qemu-iotests/common.filter M tests/qemu-iotests/common.rc Log Message: ----------- qemu-iotests: Filter NFS paths NFS paths were only partially filtered in _filter_img_create, _img_info and _filter_img_info, resulting in "nfs://127.0.0.1TEST_DIR/t.IMGFMT". This adds another replacement to the sed calls that matches the test directory not as a host path, but as an NFS URL (the prefix as used for $TEST_IMG). Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Fam Zheng <f...@redhat.com> Commit: 4e24ed138b344f50a1b6ef59ad49b8a7bac15f1b https://github.com/qemu/qemu/commit/4e24ed138b344f50a1b6ef59ad49b8a7bac15f1b Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M tests/qemu-iotests/086 Log Message: ----------- qemu-iotests: 086 doesn't work with NFS The reference output file only works for file. 'qemu-img convert -p' makes a lot more progress updates for NFS than for file, so disable the test for NFS. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Fam Zheng <f...@redhat.com> Commit: ae8622ec1971cd4a63db4da25ecffa9ba21f811c https://github.com/qemu/qemu/commit/ae8622ec1971cd4a63db4da25ecffa9ba21f811c Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block/sheepdog.c Log Message: ----------- sheepdog: Remove unnecessary NULL check in sd_prealloc() In commit 8b9ad56e9cbfd852a, we removed the code that could result in our getting to sd_prealloc()'s out_with_err_set label with a NULL blk pointer. That makes the NULL check in the error-handling path unnecessary, and Coverity gripes about it (CID 1390636). Delete the redundant check. Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: c4d1ff2bfc3c40ce172ebc9a8860672ed97a3b4f https://github.com/qemu/qemu/commit/c4d1ff2bfc3c40ce172ebc9a8860672ed97a3b4f Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M tests/qemu-iotests/group Log Message: ----------- qemu-iotests: Add more tests to "migration" group grep for "migrate" turns up a few test cases which use migration, but haven't been in the "migration" group so far. Add them to the group. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Juan Quintela <quint...@redhat.com> Commit: 169926dccfaa06f15a172331bcf0f13bd595e2e5 https://github.com/qemu/qemu/commit/169926dccfaa06f15a172331bcf0f13bd595e2e5 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M tests/qemu-iotests/185 M tests/qemu-iotests/191 Log Message: ----------- qemu-iotests: Remove MIG_SOCKET from non-migration tests 185 and 191 define a MIG_SOCKET even though they don't do anything with migration. Remove the useless variable. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Juan Quintela <quint...@redhat.com> Commit: cd44d96be90e7767c6fb8f33b90939eb58814956 https://github.com/qemu/qemu/commit/cd44d96be90e7767c6fb8f33b90939eb58814956 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M qapi/block-core.json Log Message: ----------- blockjob: Update block-job-pause/resume documentation Commit 0ec4dfb8d changed block-job_pause/resume so that they return an error if they don't do anything because the job is already paused/running. It forgot to update the documentation, so do that now. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Commit: a81e0a825e3b89039a427bca037112f461b95fec https://github.com/qemu/qemu/commit/a81e0a825e3b89039a427bca037112f461b95fec Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M qapi/block-core.json Log Message: ----------- blockjob: Improve BlockJobInfo.offset/len documentation Clarify that len is just an estimation of the end value of offset, and that offset increases monotonically while len can change arbitrarily. While touching the documentation of offset, move it directly after len to match the order of the declaration below. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Commit: 33e9e9bd62d9ae00880d9e12ad8a5b7d2c00e8a5 https://github.com/qemu/qemu/commit/33e9e9bd62d9ae00880d9e12ad8a5b7d2c00e8a5 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M MAINTAINERS M Makefile.objs M block/backup.c M block/commit.c M block/mirror.c M block/stream.c M blockjob.c M include/block/blockjob.h M include/block/blockjob_int.h A include/qemu/job.h A job.c M tests/test-bdrv-drain.c M tests/test-blockjob-txn.c M tests/test-blockjob.c Log Message: ----------- job: Create Job, JobDriver and job_create() This is the first step towards creating an infrastructure for generic background jobs that aren't tied to a block device. For now, Job only stores its ID and JobDriver, the rest stays in BlockJob. The following patches will move over more parts of BlockJob to Job if they are meaningful outside the context of a block job. BlockJob.driver is now redundant, but this patch leaves it around to avoid unnecessary churn. The next patches will get rid of almost all of its uses anyway so that it can be removed later with much less churn. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Commit: 8e4c87000fc515f8f65f7c8f18afb1e9270b11d6 https://github.com/qemu/qemu/commit/8e4c87000fc515f8f65f7c8f18afb1e9270b11d6 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block/backup.c M block/commit.c M block/mirror.c M block/stream.c M blockjob.c M include/block/blockjob_int.h M qapi/block-core.json Log Message: ----------- job: Rename BlockJobType into JobType QAPI types aren't externally visible, so we can rename them without causing problems. Before we add a job type to Job, rename the enum so it can be used for more than just block jobs. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Commit: 252291eaeafcd234a602d71cdf9415dbfc7bc867 https://github.com/qemu/qemu/commit/252291eaeafcd234a602d71cdf9415dbfc7bc867 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block/backup.c M block/commit.c M block/mirror.c M block/stream.c M blockjob.c M include/block/blockjob_int.h M include/qemu/job.h M job.c Log Message: ----------- job: Add JobDriver.job_type This moves the job_type field from BlockJobDriver to JobDriver. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Commit: fd61a701f1de8e4c1d89b3716ba9ca749cf5c724 https://github.com/qemu/qemu/commit/fd61a701f1de8e4c1d89b3716ba9ca749cf5c724 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M blockjob.c M include/qemu/job.h M job.c Log Message: ----------- job: Add job_delete() This moves freeing the Job object and its fields from block_job_unref() to job_delete(). Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Commit: e7c1d78bbd5867804debeb7159b137fd9a6c44d3 https://github.com/qemu/qemu/commit/e7c1d78bbd5867804debeb7159b137fd9a6c44d3 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M blockjob.c M include/block/blockjob.h M include/qemu/job.h M job.c Log Message: ----------- 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 <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Commit: a50c2ab858fe613fb805e53b4f6b970ab936706d https://github.com/qemu/qemu/commit/a50c2ab858fe613fb805e53b4f6b970ab936706d Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block/trace-events M blockjob.c M include/block/blockjob.h M include/qemu/job.h M job.c M qapi/block-core.json M tests/test-blockjob.c M trace-events Log Message: ----------- job: Move state transitions to Job This moves BlockJob.status and the closely related functions (block_)job_state_transition() and (block_)job_apply_verb to Job. The two QAPI enums are renamed to JobStatus and JobVerb. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 80fa2c756b3241f24015a7503a01f7999d4a942d https://github.com/qemu/qemu/commit/80fa2c756b3241f24015a7503a01f7999d4a942d Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block/backup.c M block/commit.c M block/mirror.c M block/stream.c M blockjob.c M include/block/blockjob.h M include/block/blockjob_int.h M include/qemu/job.h M job.c M qemu-img.c M tests/test-bdrv-drain.c M tests/test-blockjob-txn.c M tests/test-blockjob.c Log Message: ----------- job: Add reference counting This moves reference counting from BlockJob to Job. In order to keep calling the BlockJob cleanup code when the job is deleted via job_unref(), introduce a new JobDriver.free callback. Every block job must use block_job_free() for this callback, this is asserted in block_job_create(). Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Commit: daa7f2f9467bc5624f04f28d4b01b88f08c6589c https://github.com/qemu/qemu/commit/daa7f2f9467bc5624f04f28d4b01b88f08c6589c Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block/backup.c M block/commit.c M block/mirror.c M block/stream.c M blockjob.c M include/block/blockjob.h M include/block/blockjob_int.h M include/qemu/job.h M job.c M tests/test-blockjob-txn.c M tests/test-blockjob.c Log Message: ----------- job: Move cancelled to Job We cannot yet move the whole logic around job cancelling to Job because it depends on quite a few other things that are still only in BlockJob, but we can move the cancelled field at least. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Commit: 08be6fe26f6c76d900fc987f58d322b94bc4e248 https://github.com/qemu/qemu/commit/08be6fe26f6c76d900fc987f58d322b94bc4e248 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M blockjob.c M include/qemu/job.h M job.c Log Message: ----------- job: Add Job.aio_context When block jobs need an AioContext, they just take it from their main block node. Generic jobs don't have a main block node, so we need to assign them an AioContext explicitly. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Commit: 1908a5590c7d214b1b6886bc19b81076fb65cec9 https://github.com/qemu/qemu/commit/1908a5590c7d214b1b6886bc19b81076fb65cec9 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block/backup.c M block/commit.c M block/mirror.c M block/stream.c M blockjob.c M include/block/blockjob.h M include/block/blockjob_int.h M include/qemu/job.h M job.c M tests/test-bdrv-drain.c M tests/test-blockjob-txn.c M tests/test-blockjob.c Log Message: ----------- job: Move defer_to_main_loop to Job Move the defer_to_main_loop functionality from BlockJob to Job. The code can be simplified because we can use job->aio_context in job_defer_to_main_loop_bh() now, instead of having to access the BlockDriverState. Probably taking the data->aio_context lock in addition was already unnecessary in the old code because we didn't actually make use of anything protected by the old AioContext except getting the new AioContext, in case it changed between scheduling the BH and running it. But it's certainly unnecessary now that the BDS isn't accessed at all any more. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Commit: da01ff7f38f52791f93fc3ca59afcfbb220f15af https://github.com/qemu/qemu/commit/da01ff7f38f52791f93fc3ca59afcfbb220f15af Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block/backup.c M block/commit.c M block/mirror.c M block/replication.c M block/stream.c M blockdev.c M blockjob.c M include/block/blockjob.h M include/block/blockjob_int.h M include/qemu/job.h M job.c M tests/test-bdrv-drain.c M tests/test-blockjob-txn.c M tests/test-blockjob.c Log Message: ----------- job: Move coroutine and related code to Job This commit moves some core functions for dealing with the job coroutine from BlockJob to Job. This includes primarily entering the coroutine (both for the first and reentering) and yielding explicitly and at pause points. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Commit: 5d43e86e11f488fda7956b13160e0c0105a84845 https://github.com/qemu/qemu/commit/5d43e86e11f488fda7956b13160e0c0105a84845 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block/backup.c M block/commit.c M block/mirror.c M block/stream.c M blockjob.c M include/block/blockjob_int.h M include/qemu/job.h M job.c M tests/test-bdrv-drain.c M tests/test-blockjob-txn.c M tests/test-blockjob.c Log Message: ----------- job: Add job_sleep_ns() There is nothing block layer specific about block_job_sleep_ns(), so move the function to Job. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Commit: b15de82867975e0b4acf644b5ee36d84904b6612 https://github.com/qemu/qemu/commit/b15de82867975e0b4acf644b5ee36d84904b6612 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block/backup.c M block/commit.c M block/mirror.c M block/stream.c M blockdev.c M blockjob.c M include/block/blockjob.h M include/block/blockjob_int.h M include/qemu/job.h M job.c M tests/test-bdrv-drain.c M tests/test-blockjob-txn.c M tests/test-blockjob.c Log Message: ----------- job: Move pause/resume functions to Job While we already moved the state related to job pausing to Job, the functions to do were still BlockJob only. This commit moves them over to Job. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Commit: dbe5e6c1f73b41282624b78a2375a5c3ee59e905 https://github.com/qemu/qemu/commit/dbe5e6c1f73b41282624b78a2375a5c3ee59e905 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M blockjob.c M include/block/blockjob.h M include/qemu/job.h M job.c M qemu-img.c Log Message: ----------- job: Replace BlockJob.completed with job_is_completed() Since we introduced an explicit status to block job, BlockJob.completed is redundant because it can be derived from the status. Remove the field from BlockJob and add a function to derive it from the status at the Job level. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Commit: bb02b65c7d57e4f2136f39bfba95cc68d89eb216 https://github.com/qemu/qemu/commit/bb02b65c7d57e4f2136f39bfba95cc68d89eb216 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block/commit.c M block/mirror.c M block/replication.c M block/stream.c M blockdev.c M blockjob.c M include/block/blockjob.h M include/block/blockjob_int.h M include/qemu/job.h M job.c M qemu-img.c M tests/test-blockjob-txn.c M tests/test-blockjob.c Log Message: ----------- 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 <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Commit: 5d4f376998bc6b01402b90634385b082b2eb5c5b https://github.com/qemu/qemu/commit/5d4f376998bc6b01402b90634385b082b2eb5c5b Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M blockjob.c Log Message: ----------- blockjob: Split block_job_event_pending() block_job_event_pending() doesn't only send a QMP event, but it also transitions to the PENDING state. Split the function so that we get one part only sending the event (like other block_job_event_* functions) and another part that does the state transition. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Commit: 139a9f020d49e9f863e0d46fd3d0b440dfb3b9d7 https://github.com/qemu/qemu/commit/139a9f020d49e9f863e0d46fd3d0b440dfb3b9d7 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M blockjob.c M include/block/blockjob.h M include/qemu/job.h M job.c Log Message: ----------- job: Add job_event_*() Go through the Job layer in order to send QMP events. For the moment, these functions only call a notifier in the BlockJob layer that sends the existing commands. This uses notifiers rather than JobDriver callbacks because internal users of jobs won't receive QMP events, but might still be interested in getting notified for the events. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Commit: 4ad351819b974d724e926fd23cdd66bec3c9768e https://github.com/qemu/qemu/commit/4ad351819b974d724e926fd23cdd66bec3c9768e Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block/backup.c M block/commit.c M block/mirror.c M blockjob.c M include/block/blockjob.h M include/block/blockjob_int.h M include/qemu/job.h M job.c M qemu-img.c M tests/test-blockjob.c Log Message: ----------- job: Move single job finalisation to Job This moves the finalisation of a single job from BlockJob to Job. Some part of this code depends on job transactions, and job transactions call this code, we introduce some temporary calls from Job functions to BlockJob ones. This will be fixed once transactions move to Job, too. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Commit: 004e95df98266da33e08c9f1731aca71b6d6d7c4 https://github.com/qemu/qemu/commit/004e95df98266da33e08c9f1731aca71b6d6d7c4 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block/mirror.c M blockjob.c M include/block/blockjob.h M include/qemu/job.h Log Message: ----------- job: Convert block_job_cancel_async() to Job block_job_cancel_async() did two things that were still block job specific: * Setting job->force. This field makes sense on the Job level, so we can just move it. While at it, rename it to job->force_cancel to make its purpose more obvious. * Resetting the I/O status. This can't be moved because generic Jobs don't have an I/O status. What the function really implements is a user resume, except without entering the coroutine. Consequently, it makes sense to call the .user_resume driver callback here which already resets the I/O status. The old block_job_cancel_async() has two separate if statements that check job->iostatus != BLOCK_DEVICE_IO_STATUS_OK and job->user_paused. However, the former condition always implies the latter (as is asserted in block_job_iostatus_reset()), so changing the explicit call of block_job_iostatus_reset() on the former condition with the .user_resume callback on the latter condition is equivalent and doesn't need to access any BlockJob specific state. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Commit: b69f777dd9ba992fdd35828a90eefcd88c0ec332 https://github.com/qemu/qemu/commit/b69f777dd9ba992fdd35828a90eefcd88c0ec332 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block/backup.c M block/commit.c M block/mirror.c M block/stream.c M blockjob.c M include/block/blockjob_int.h M include/qemu/job.h M job.c M tests/test-bdrv-drain.c M tests/test-blockjob-txn.c M tests/test-blockjob.c Log Message: ----------- job: Add job_drain() block_job_drain() contains a blk_drain() call which cannot be moved to Job, so add a new JobDriver callback JobDriver.drain which has a common implementation for all BlockJobs. In addition to this we keep the existing BlockJobDriver.drain callback that is called by the common drain implementation for all block jobs. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Commit: 3453d97243c72988c89a0105fa9546890eae7bd4 https://github.com/qemu/qemu/commit/3453d97243c72988c89a0105fa9546890eae7bd4 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block/mirror.c M blockdev.c M blockjob.c M include/block/blockjob.h M include/block/blockjob_int.h M include/qemu/job.h M job.c M tests/test-bdrv-drain.c M tests/test-blockjob.c Log Message: ----------- job: Move .complete callback to Job This moves the .complete callback that tells a READY job to complete from BlockJobDriver to JobDriver. The wrapper function job_complete() doesn't require anything block job specific any more and can be moved to Job. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Commit: 6a74c075aca731e7e945201a4ae2336b8e328433 https://github.com/qemu/qemu/commit/6a74c075aca731e7e945201a4ae2336b8e328433 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block/commit.c M blockjob.c M include/qemu/job.h M job.c Log Message: ----------- job: Move job_finish_sync() to Job block_job_finish_sync() doesn't contain anything block job specific any more, so it can be moved to Job. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Commit: 62c9e4162a7bc26a1389e50d17d3b2637028bbc3 https://github.com/qemu/qemu/commit/62c9e4162a7bc26a1389e50d17d3b2637028bbc3 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block/backup.c M blockdev.c M blockjob.c M include/block/block_int.h M include/block/blockjob.h M include/block/blockjob_int.h M include/qemu/job.h M tests/test-blockjob-txn.c Log Message: ----------- job: Switch transactions to JobTxn This doesn't actually move any transaction code to Job yet, but it renames the type for transactions from BlockJobTxn to JobTxn and makes them contain Jobs rather than BlockJobs Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Commit: 7eaa8fb57da96301f4a8ce176ad503f80efc7cc0 https://github.com/qemu/qemu/commit/7eaa8fb57da96301f4a8ce176ad503f80efc7cc0 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M blockdev.c M blockjob.c M include/block/blockjob.h M include/block/blockjob_int.h M include/qemu/job.h M job.c M tests/test-blockjob-txn.c M tests/test-blockjob.c Log Message: ----------- job: Move transactions to Job This moves the logic that implements job transactions from BlockJob to Job. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Commit: 3d70ff53b6bf90d9eec6f97024ec9895f6799d9e https://github.com/qemu/qemu/commit/3d70ff53b6bf90d9eec6f97024ec9895f6799d9e Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block.c M block/backup.c M block/commit.c M block/mirror.c M block/replication.c M block/stream.c M block/trace-events M blockdev.c M blockjob.c M include/block/blockjob.h M include/block/blockjob_int.h M include/qemu/job.h M job.c M qemu-img.c M tests/test-bdrv-drain.c M tests/test-blockjob-txn.c M tests/test-blockjob.c M trace-events Log Message: ----------- job: Move completion and cancellation to Job This moves the top-level job completion and cancellation functions from BlockJob to Job. Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: b3b5299d58bce4366c647af40374e6b063f371eb https://github.com/qemu/qemu/commit/b3b5299d58bce4366c647af40374e6b063f371eb Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block.c M qemu-nbd.c M vl.c Log Message: ----------- block: Cancel job in bdrv_close_all() callers Now that we cancel all jobs and not only block jobs on shutdown, doing that in bdrv_close_all() isn't really appropriate any more. Move the job_cancel_sync_all() call to the callers, and only assert that there are no job running in bdrv_close_all(). Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 198c49cc8d81e8eb0df3749d395599895c3a3a76 https://github.com/qemu/qemu/commit/198c49cc8d81e8eb0df3749d395599895c3a3a76 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block/backup.c M block/mirror.c M blockjob.c M include/block/blockjob_int.h M include/qemu/job.h M job.c M tests/test-blockjob-txn.c Log Message: ----------- job: Add job_yield() This moves block_job_yield() to the Job layer. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Commit: 5f9a6a08e8f65e01746d2485fc65a3a78e74865f https://github.com/qemu/qemu/commit/5f9a6a08e8f65e01746d2485fc65a3a78e74865f Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M blockdev.c M blockjob.c M include/block/blockjob.h M include/qemu/job.h M job.c M tests/test-blockjob.c Log Message: ----------- job: Add job_dismiss() This moves block_job_dismiss() to the Job layer. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Commit: df956ae2014340bf7de0190edb1d09be55d9eadf https://github.com/qemu/qemu/commit/df956ae2014340bf7de0190edb1d09be55d9eadf Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M blockjob.c M include/block/blockjob.h M include/qemu/job.h M job.c M qemu-img.c M tests/test-blockjob.c Log Message: ----------- job: Add job_is_ready() Instead of having a 'bool ready' in BlockJob, add a function that derives its value from the job status. At the same time, this fixes the behaviour to match what the QAPI documentation promises for query-block-job: 'true if the job may be completed'. When the ready flag was introduced in commit ef6dbf1e46e, the flag never had to be reset to match the description because after being ready, the jobs would immediately complete and disappear. Job transactions and manual job finalisation were introduced only later. With these changes, jobs may stay around even after having completed (and they are not ready to be completed a second time), however their patches forgot to reset the ready flag. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Commit: 2e1795b58131427719c7cd11f8b9b6984b3f24f8 https://github.com/qemu/qemu/commit/2e1795b58131427719c7cd11f8b9b6984b3f24f8 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block/mirror.c M blockjob.c M include/block/blockjob.h M include/block/blockjob_int.h M include/qemu/job.h M job.c M tests/test-bdrv-drain.c M tests/test-blockjob.c Log Message: ----------- job: Add job_transition_to_ready() The transition to the READY state was still performed in the BlockJob layer, in the same function that sent the BLOCK_JOB_READY QMP event. This patch brings the state transition to the Job layer and implements the QMP event using a notifier called from the Job layer, like we already do for other events related to state transitions. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Commit: 30a5c887bf4a7e00d0e0ecbb08509e8ba2902620 https://github.com/qemu/qemu/commit/30a5c887bf4a7e00d0e0ecbb08509e8ba2902620 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M block/backup.c M block/commit.c M block/mirror.c M block/stream.c M blockjob.c M include/block/blockjob.h M include/qemu/job.h M job.c M qemu-img.c Log Message: ----------- job: Move progress fields to Job BlockJob has fields .offset and .len, which are actually misnomers today because they are no longer tied to block device sizes, but just progress counters. As such they make a lot of sense in generic Jobs. This patch moves the fields to Job and renames them to .progress_current and .progress_total to describe their function better. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Commit: bf42508f24ee1368267b421e145fa90315b77936 https://github.com/qemu/qemu/commit/bf42508f24ee1368267b421e145fa90315b77936 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M MAINTAINERS M Makefile M Makefile.objs M qapi/block-core.json A qapi/job.json M qapi/qapi-schema.json Log Message: ----------- job: Introduce qapi/job.json This adds a separate schema file for all job-related definitions that aren't tied to the block layer. For a start, move the enums JobType, JobStatus and JobVerb. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 1dac83f1a10c4c66858075970e199f4e4a8d8b71 https://github.com/qemu/qemu/commit/1dac83f1a10c4c66858075970e199f4e4a8d8b71 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M job.c M qapi/job.json M tests/qemu-iotests/030 M tests/qemu-iotests/040 M tests/qemu-iotests/041 M tests/qemu-iotests/094.out M tests/qemu-iotests/095 M tests/qemu-iotests/095.out M tests/qemu-iotests/109 M tests/qemu-iotests/109.out M tests/qemu-iotests/124 M tests/qemu-iotests/127.out M tests/qemu-iotests/141 M tests/qemu-iotests/141.out M tests/qemu-iotests/144 M tests/qemu-iotests/144.out M tests/qemu-iotests/156 M tests/qemu-iotests/156.out M tests/qemu-iotests/185 M tests/qemu-iotests/185.out M tests/qemu-iotests/191 M tests/qemu-iotests/191.out M tests/qemu-iotests/iotests.py Log Message: ----------- job: Add JOB_STATUS_CHANGE QMP event This adds a QMP event that is emitted whenever a job transitions from one status to another. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 1a90bc8128ee7d16ce4abb131961e37084d75b16 https://github.com/qemu/qemu/commit/1a90bc8128ee7d16ce4abb131961e37084d75b16 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M MAINTAINERS M Makefile.objs A job-qmp.c M qapi/job.json M trace-events Log Message: ----------- job: Add lifecycle QMP commands This adds QMP commands that control the transition between states of the job lifecycle. Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 456273b02474780537e2bb52a72213f63bb5227a https://github.com/qemu/qemu/commit/456273b02474780537e2bb52a72213f63bb5227a Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M include/qemu/job.h M job-qmp.c M job.c M qapi/job.json Log Message: ----------- job: Add query-jobs QMP command This adds a minimal query-jobs implementation that shouldn't pose many design questions. It can later be extended to expose more information, and especially job-specific information. Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 9f6bb4c004a6458227b9eec6aff3f79afe159699 https://github.com/qemu/qemu/commit/9f6bb4c004a6458227b9eec6aff3f79afe159699 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M blockjob.c M include/block/blockjob.h Log Message: ----------- blockjob: Remove BlockJob.driver BlockJob.driver is redundant with Job.driver and only used in very few places any more. Remove it. Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 62a9428812c0f4aacbf2f7fdf449fa4f4ab3775c https://github.com/qemu/qemu/commit/62a9428812c0f4aacbf2f7fdf449fa4f4ab3775c Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: M tests/qemu-iotests/041 M tests/qemu-iotests/155 M tests/qemu-iotests/iotests.py Log Message: ----------- iotests: Move qmp_to_opts() to VM qmp_to_opts() used to be a method of QMPTestCase, but recently we started to add more Python test cases that don't make use of QMPTestCase. In order to make the method usable there, move it to VM. Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Commit: bdebdc712b06ba82e103d617c335830682cde242 https://github.com/qemu/qemu/commit/bdebdc712b06ba82e103d617c335830682cde242 Author: Kevin Wolf <kw...@redhat.com> Date: 2018-05-23 (Wed, 23 May 2018) Changed paths: A tests/qemu-iotests/219 A tests/qemu-iotests/219.out M tests/qemu-iotests/group Log Message: ----------- qemu-iotests: Test job-* with block jobs This adds a test case that tests the new job-* QMP commands with mirror and backup block jobs. Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 37cbe4da617e87778ea324c3f5d08ba780bed1ea https://github.com/qemu/qemu/commit/37cbe4da617e87778ea324c3f5d08ba780bed1ea Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2018-05-24 (Thu, 24 May 2018) Changed paths: M MAINTAINERS M Makefile M Makefile.objs M block.c M block/backup.c M block/commit.c M block/mirror.c M block/replication.c M block/sheepdog.c M block/stream.c M block/trace-events M blockdev.c M blockjob.c M include/block/block_int.h M include/block/blockjob.h M include/block/blockjob_int.h A include/qemu/job.h A job-qmp.c A job.c M qapi/block-core.json A qapi/job.json M qapi/qapi-schema.json M qemu-img.c M qemu-nbd.c M tests/qemu-iotests/030 M tests/qemu-iotests/040 M tests/qemu-iotests/041 M tests/qemu-iotests/086 M tests/qemu-iotests/094.out M tests/qemu-iotests/095 M tests/qemu-iotests/095.out M tests/qemu-iotests/109 M tests/qemu-iotests/109.out M tests/qemu-iotests/124 M tests/qemu-iotests/126.out M tests/qemu-iotests/127.out M tests/qemu-iotests/141 M tests/qemu-iotests/141.out M tests/qemu-iotests/144 M tests/qemu-iotests/144.out M tests/qemu-iotests/155 M tests/qemu-iotests/156 M tests/qemu-iotests/156.out M tests/qemu-iotests/185 M tests/qemu-iotests/185.out M tests/qemu-iotests/191 M tests/qemu-iotests/191.out A tests/qemu-iotests/219 A tests/qemu-iotests/219.out M tests/qemu-iotests/common.filter M tests/qemu-iotests/common.rc M tests/qemu-iotests/group M tests/qemu-iotests/iotests.py M tests/test-bdrv-drain.c M tests/test-blockjob-txn.c M tests/test-blockjob.c M trace-events M vl.c Log Message: ----------- Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging Block layer patches: - Generic background jobs - qemu-iotests fixes for NFS and the 'migration' group - sheepdog: Minor code simplification # gpg: Signature made Wed 23 May 2018 13:33:49 BST # gpg: using RSA key 7F09B272C88F2FD6 # gpg: Good signature from "Kevin Wolf <kw...@redhat.com>" # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: (46 commits) qemu-iotests: Test job-* with block jobs iotests: Move qmp_to_opts() to VM blockjob: Remove BlockJob.driver job: Add query-jobs QMP command job: Add lifecycle QMP commands job: Add JOB_STATUS_CHANGE QMP event job: Introduce qapi/job.json job: Move progress fields to Job job: Add job_transition_to_ready() job: Add job_is_ready() job: Add job_dismiss() job: Add job_yield() block: Cancel job in bdrv_close_all() callers job: Move completion and cancellation to Job job: Move transactions to Job job: Switch transactions to JobTxn job: Move job_finish_sync() to Job job: Move .complete callback to Job job: Add job_drain() job: Convert block_job_cancel_async() to Job ... Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Compare: https://github.com/qemu/qemu/compare/5ff2a4b97f6d...37cbe4da617e **NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.