diff options
Diffstat (limited to 'src/test/librbd/io/test_mock_ImageRequest.cc')
-rw-r--r-- | src/test/librbd/io/test_mock_ImageRequest.cc | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/src/test/librbd/io/test_mock_ImageRequest.cc b/src/test/librbd/io/test_mock_ImageRequest.cc index 546f2d04d96..9d6423d66c4 100644 --- a/src/test/librbd/io/test_mock_ImageRequest.cc +++ b/src/test/librbd/io/test_mock_ImageRequest.cc @@ -211,7 +211,7 @@ TEST_F(TestMockIoImageRequest, AioWriteModifyTimestamp) { bl.append("1"); MockImageWriteRequest mock_aio_image_write_1( mock_image_ctx, aio_comp_1, {{0, 1}}, ImageArea::DATA, std::move(bl), - mock_image_ctx.get_data_io_context(), 0, {}); + 0, {}); { std::shared_lock owner_locker{mock_image_ctx.owner_lock}; mock_aio_image_write_1.send(); @@ -224,7 +224,7 @@ TEST_F(TestMockIoImageRequest, AioWriteModifyTimestamp) { bl.append("1"); MockImageWriteRequest mock_aio_image_write_2( mock_image_ctx, aio_comp_2, {{0, 1}}, ImageArea::DATA, std::move(bl), - mock_image_ctx.get_data_io_context(), 0, {}); + 0, {}); { std::shared_lock owner_locker{mock_image_ctx.owner_lock}; mock_aio_image_write_2.send(); @@ -306,7 +306,7 @@ TEST_F(TestMockIoImageRequest, PartialDiscard) { &aio_comp_ctx, ictx, AIO_TYPE_DISCARD); MockImageDiscardRequest mock_aio_image_discard( mock_image_ctx, aio_comp, {{16, 63}, {84, 100}}, ImageArea::DATA, - ictx->discard_granularity_bytes, mock_image_ctx.get_data_io_context(), {}); + ictx->discard_granularity_bytes, {}); { std::shared_lock owner_locker{mock_image_ctx.owner_lock}; mock_aio_image_discard.send(); @@ -334,7 +334,7 @@ TEST_F(TestMockIoImageRequest, TailDiscard) { MockImageDiscardRequest mock_aio_image_discard( mock_image_ctx, aio_comp, {{ictx->layout.object_size - 1024, 1024}}, ImageArea::DATA, - ictx->discard_granularity_bytes, mock_image_ctx.get_data_io_context(), {}); + ictx->discard_granularity_bytes, {}); { std::shared_lock owner_locker{mock_image_ctx.owner_lock}; mock_aio_image_discard.send(); @@ -364,8 +364,7 @@ TEST_F(TestMockIoImageRequest, DiscardGranularity) { MockImageDiscardRequest mock_aio_image_discard( mock_image_ctx, aio_comp, {{16, 63}, {96, 31}, {84, 100}, {ictx->layout.object_size - 33, 33}}, - ImageArea::DATA, ictx->discard_granularity_bytes, - mock_image_ctx.get_data_io_context(), {}); + ImageArea::DATA, ictx->discard_granularity_bytes, {}); { std::shared_lock owner_locker{mock_image_ctx.owner_lock}; mock_aio_image_discard.send(); @@ -397,7 +396,7 @@ TEST_F(TestMockIoImageRequest, PartialDiscardJournalAppendEnabled) { &aio_comp_ctx, ictx, AIO_TYPE_DISCARD); MockImageDiscardRequest mock_aio_image_discard( mock_image_ctx, aio_comp, {{16, 63}, {84, 100}}, ImageArea::DATA, - ictx->discard_granularity_bytes, mock_image_ctx.get_data_io_context(), {}); + ictx->discard_granularity_bytes, {}); { std::shared_lock owner_locker{mock_image_ctx.owner_lock}; mock_aio_image_discard.send(); @@ -431,7 +430,7 @@ TEST_F(TestMockIoImageRequest, TailDiscardJournalAppendEnabled) { MockImageDiscardRequest mock_aio_image_discard( mock_image_ctx, aio_comp, {{ictx->layout.object_size - 1024, 1024}}, ImageArea::DATA, - ictx->discard_granularity_bytes, mock_image_ctx.get_data_io_context(), {}); + ictx->discard_granularity_bytes, {}); { std::shared_lock owner_locker{mock_image_ctx.owner_lock}; mock_aio_image_discard.send(); @@ -460,9 +459,8 @@ TEST_F(TestMockIoImageRequest, PruneRequiredDiscardJournalAppendEnabled) { AioCompletion *aio_comp = AioCompletion::create_and_start( &aio_comp_ctx, ictx, AIO_TYPE_DISCARD); MockImageDiscardRequest mock_aio_image_discard( - mock_image_ctx, aio_comp, {{96, 31}}, - ImageArea::DATA, ictx->discard_granularity_bytes, - mock_image_ctx.get_data_io_context(), {}); + mock_image_ctx, aio_comp, {{96, 31}}, ImageArea::DATA, + ictx->discard_granularity_bytes, {}); { std::shared_lock owner_locker{mock_image_ctx.owner_lock}; mock_aio_image_discard.send(); @@ -491,9 +489,8 @@ TEST_F(TestMockIoImageRequest, LengthModifiedDiscardJournalAppendEnabled) { AioCompletion *aio_comp = AioCompletion::create_and_start( &aio_comp_ctx, ictx, AIO_TYPE_DISCARD); MockImageDiscardRequest mock_aio_image_discard( - mock_image_ctx, aio_comp, {{16, 63}}, - ImageArea::DATA, ictx->discard_granularity_bytes, - mock_image_ctx.get_data_io_context(), {}); + mock_image_ctx, aio_comp, {{16, 63}}, ImageArea::DATA, + ictx->discard_granularity_bytes, {}); { std::shared_lock owner_locker{mock_image_ctx.owner_lock}; mock_aio_image_discard.send(); @@ -531,8 +528,7 @@ TEST_F(TestMockIoImageRequest, DiscardGranularityJournalAppendEnabled) { MockImageDiscardRequest mock_aio_image_discard( mock_image_ctx, aio_comp, {{16, 63}, {96, 31}, {84, 100}, {ictx->layout.object_size - 33, 33}}, - ImageArea::DATA, ictx->discard_granularity_bytes, - mock_image_ctx.get_data_io_context(), {}); + ImageArea::DATA, ictx->discard_granularity_bytes, {}); { std::shared_lock owner_locker{mock_image_ctx.owner_lock}; mock_aio_image_discard.send(); @@ -562,8 +558,7 @@ TEST_F(TestMockIoImageRequest, AioWriteJournalAppendDisabled) { bufferlist bl; bl.append("1"); MockImageWriteRequest mock_aio_image_write( - mock_image_ctx, aio_comp, {{0, 1}}, ImageArea::DATA, std::move(bl), - mock_image_ctx.get_data_io_context(), 0, {}); + mock_image_ctx, aio_comp, {{0, 1}}, ImageArea::DATA, std::move(bl), 0, {}); { std::shared_lock owner_locker{mock_image_ctx.owner_lock}; mock_aio_image_write.send(); @@ -592,7 +587,7 @@ TEST_F(TestMockIoImageRequest, AioDiscardJournalAppendDisabled) { &aio_comp_ctx, ictx, AIO_TYPE_DISCARD); MockImageDiscardRequest mock_aio_image_discard( mock_image_ctx, aio_comp, {{0, 1}}, ImageArea::DATA, - ictx->discard_granularity_bytes, mock_image_ctx.get_data_io_context(), {}); + ictx->discard_granularity_bytes, {}); { std::shared_lock owner_locker{mock_image_ctx.owner_lock}; mock_aio_image_discard.send(); @@ -650,8 +645,7 @@ TEST_F(TestMockIoImageRequest, AioWriteSameJournalAppendDisabled) { bufferlist bl; bl.append("1"); MockImageWriteSameRequest mock_aio_image_writesame( - mock_image_ctx, aio_comp, {{0, 1}}, ImageArea::DATA, std::move(bl), - mock_image_ctx.get_data_io_context(), 0, {}); + mock_image_ctx, aio_comp, {{0, 1}}, ImageArea::DATA, std::move(bl), 0, {}); { std::shared_lock owner_locker{mock_image_ctx.owner_lock}; mock_aio_image_writesame.send(); @@ -685,8 +679,7 @@ TEST_F(TestMockIoImageRequest, AioCompareAndWriteJournalAppendDisabled) { uint64_t mismatch_offset; MockImageCompareAndWriteRequest mock_aio_image_write( mock_image_ctx, aio_comp, {{0, 1}}, ImageArea::DATA, - std::move(cmp_bl), std::move(write_bl), &mismatch_offset, - mock_image_ctx.get_data_io_context(), 0, {}); + std::move(cmp_bl), std::move(write_bl), &mismatch_offset, 0, {}); { std::shared_lock owner_locker{mock_image_ctx.owner_lock}; mock_aio_image_write.send(); |