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 <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
diff --git a/tests/test-blockjob-txn.c b/tests/test-blockjob-txn.c
index 5789893..48b12d1 100644
--- a/tests/test-blockjob-txn.c
+++ b/tests/test-blockjob-txn.c
@@ -74,7 +74,9 @@
}
static const BlockJobDriver test_block_job_driver = {
- .instance_size = sizeof(TestBlockJob),
+ .job_driver = {
+ .instance_size = sizeof(TestBlockJob),
+ },
.start = test_block_job_run,
};