以aio_write为例,给出librbd cache相关的调用顺序:
注意,下文用 ->
表示实例函数 ,::
表示静态函数。
- Image->aio_write
- ImageRequestWQ->aio_write
- ImageRequest::aio_write
- ImageRequest->send
- if (m_bypass_image_cache || m_image_ctx.image_cache==nullptr)
- AbstractImageWriteRequest->send_request
- else
- ImageWriteRequest->send_image_cache_request
- PassthroughImageCache->aio_write
- ImageWriteback->aio_write
- ImageWriteRequest->set_bypass_image_cache
- ImageWriteRequest->send
- AbstractImageWriteRequest->send_request
* if (image_ctx.object_cacher == nullptr)
* AbstractImageWriteRequest->send_object_requests
* else
* ImageWriteRequest->send_object_cache_requests
* ImageCtx->write_to_cache
- AbstractImageWriteRequest->send_request
- ImageWriteback->aio_write
- PassthroughImageCache->aio_write
- ImageWriteRequest->send_image_cache_request
- if (m_bypass_image_cache || m_image_ctx.image_cache==nullptr)
- ImageRequest->send
- ImageRequest::aio_write
- ImageRequestWQ->aio_write