@@ -636,16 +636,18 @@ class QCOWFormat<I>::ReadRequest {
636636 [this , cct=qcow_format->m_image_ctx ->cct ,
637637 image_offset=cluster_extent.image_offset ,
638638 image_length=cluster_extent.cluster_length , ctx=read_ctx](int r) {
639- handle_read_cluster (cct, r, image_offset, image_length, ctx);
639+ handle_read_clusters (cct, r, image_offset, image_length, ctx);
640640 });
641641
642642 if (cluster_extent.cluster_offset == 0 ) {
643643 // QCOW header is at offset 0, implies cluster DNE
644- log_ctx->complete (-ENOENT);
644+ boost::asio::post (*qcow_format->m_image_ctx ->asio_engine ,
645+ [log_ctx] { log_ctx->complete (-ENOENT); });
645646 } else if (cluster_extent.cluster_offset == QCOW_OFLAG_ZERO) {
646647 // explicitly zeroed section
647648 read_ctx->bl .append_zero (cluster_extent.cluster_length );
648- log_ctx->complete (0 );
649+ boost::asio::post (*qcow_format->m_image_ctx ->asio_engine ,
650+ [log_ctx] { log_ctx->complete (0 ); });
649651 } else {
650652 // request the (sub)cluster from the cluster cache
651653 qcow_format->m_cluster_cache ->get_cluster (
@@ -657,8 +659,8 @@ class QCOWFormat<I>::ReadRequest {
657659 delete this ;
658660 }
659661
660- void handle_read_cluster (CephContext* cct, int r, uint64_t image_offset,
661- uint64_t image_length, Context* on_finish) const {
662+ void handle_read_clusters (CephContext* cct, int r, uint64_t image_offset,
663+ uint64_t image_length, Context* on_finish) const {
662664 // NOTE: treat as static function, expect object has been deleted
663665
664666 ldout (cct, 20 ) << " r=" << r << " , "
0 commit comments