aboutsummaryrefslogtreecommitdiff
path: root/tests/test-blockjob.c
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2019-06-06 18:41:32 +0300
committerKevin Wolf <kwolf@redhat.com>2019-06-18 16:41:10 +0200
commitb23c580c946644b906af36e3f903b9fedd6ccd61 (patch)
treefd1da098448077b498db94f12df9a1d3aa411b32 /tests/test-blockjob.c
parent8164102ffe02dfc6478c0b3f8ffce29705a9a53b (diff)
block: drop bs->job
Drop remaining users of bs->job: 1. assertions actually duplicated by assert(!bs->refcnt) 2. trace-point seems not enough reason to change stream_start to return BlockJob pointer 3. Restricting creation of two jobs based on same bs is bad idea, as 3.1 Some jobs creates filters to be their main node, so, this check don't actually prevent creating second job on same real node (which will create another filter node) (but I hope it is restricted by other mechanisms) 3.2 Even without bs->job we have two systems of permissions: op-blockers and BLK_PERM 3.3 We may want to run several jobs on one node one day And finally, drop bs->job pointer itself. Hurrah! Suggested-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/test-blockjob.c')
-rw-r--r--tests/test-blockjob.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test-blockjob.c b/tests/test-blockjob.c
index 8c91980c70..b33f899873 100644
--- a/tests/test-blockjob.c
+++ b/tests/test-blockjob.c
@@ -122,8 +122,9 @@ static void test_job_ids(void)
/* This one is valid */
job[0] = do_test_id(blk[0], "id0", true);
- /* We cannot have two jobs in the same BDS */
- do_test_id(blk[0], "id1", false);
+ /* We can have two jobs in the same BDS */
+ job[1] = do_test_id(blk[0], "id1", true);
+ job_early_fail(&job[1]->job);
/* Duplicate job IDs are not allowed */
job[1] = do_test_id(blk[1], "id0", false);