| 25 | |
| 26 | template <typename I> |
| 27 | void ImageWriteback<I>::aio_read(Extents &&image_extents, bufferlist *bl, |
| 28 | int fadvise_flags, Context *on_finish) { |
| 29 | CephContext *cct = m_image_ctx.cct; |
| 30 | ldout(cct, 20) << "image_extents=" << image_extents << ", " |
| 31 | << "on_finish=" << on_finish << dendl; |
| 32 | |
| 33 | ImageCtx *image_ctx = util::get_image_ctx(&m_image_ctx); |
| 34 | auto aio_comp = io::AioCompletion::create_and_start( |
| 35 | on_finish, image_ctx, io::AIO_TYPE_READ); |
| 36 | ZTracer::Trace trace; |
| 37 | auto req = io::ImageDispatchSpec::create_read( |
| 38 | *image_ctx, io::IMAGE_DISPATCH_LAYER_WRITEBACK_CACHE, aio_comp, |
| 39 | std::move(image_extents), io::ImageArea::DATA, io::ReadResult{bl}, |
| 40 | image_ctx->get_data_io_context(), fadvise_flags, 0, trace); |
| 41 | req->send(); |
| 42 | } |
| 43 | |
| 44 | template <typename I> |
| 45 | void ImageWriteback<I>::aio_write(Extents &&image_extents, |
no test coverage detected