ceph I/O 路径 -- rbd 写

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Hello_NB1/article/details/59117162

ssize_t rbd_write2(rbd_image_t image, uint64_t ofs, size_t len, const char *buf, int op_flags)
        int r = ictx->aio_work_queue->write(ofs, len, buf, op_flags);[ ssize_t AioImageRequestWQ::write(uint64_t off, uint64_t len, const char *buf, int op_flags) ]
                aio_write(c, off, len, buf, op_flags, false);[ void AioImageRequestWQ::aio_write(AioCompletion *c, uint64_t off, uint64_t len, const char *buf, int op_flags, bool native_async) ]
                        queue(new AioImageWrite<>(m_image_ctx, c, off, len, buf, op_flags));
                        AioImageRequest<>::aio_write(&m_image_ctx, c, off, len, buf, op_flags);



void AioImageRequest<I>::send()
        send_request();[ void AbstractAioImageWrite<I>::send_request() ]
                Striper::file_to_extents(cct, image_ctx.format_string, &image_ctx.layout, extent.first, extent.second, 0, object_extents);
                send_object_requests(object_extents, snapc, (journaling ? &requests : nullptr));[ void AioImageWrite<I>::send_object_requests(const ObjectExtents &object_extents, const ::SnapContext &snapc, AioObjectRequests *aio_object_requests) ]
                        AbstractAioImageWrite<I>::send_object_requests(object_extents, snapc, aio_object_requests);
                                AioObjectRequestHandle *request = create_object_request(*p, snapc, req_comp);
                                request->send();




void AbstractAioObjectWrite::send()
        send_write();[ void AbstractAioObjectWrite::send_write() ]
                send_pre_object_map_update();[ void AbstractAioObjectWrite::send_pre_object_map_update() ]



int librados::IoCtx::aio_operate(const std::string& oid, AioCompletion *c, librados::ObjectWriteOperation *o)
        return io_ctx_impl->aio_operate(obj, &o->impl->o, c->pc, io_ctx_impl->snapc, 0);[ int librados::IoCtxImpl::aio_operate(const object_t& oid, ::ObjectOperation *o, AioCompletionImpl *c, const SnapContext& snap_context, int flags) ]
                Objecter::Op *op = objecter->prepare_mutate_op(oid, oloc, *o, snap_context, ut, flags, onack, &c->objver);
                objecter->op_submit(op, &c->tid);[ void Objecter::op_submit(Op *op, ceph_tid_t *ptid, int *ctx_budget) ]
                        _op_submit_with_budget(op, rl, ptid, ctx_budget);[ void Objecter::_op_submit_with_budget(Op *op, shunique_lock& sul, ceph_tid_t *ptid, int *ctx_budget) ]
                                _op_submit(op, sul, ptid);[ void Objecter::_op_submit(Op *op, shunique_lock& sul, ceph_tid_t *ptid) ]
                                        bool check_for_latest_map = _calc_target(&op->target) == RECALC_OP_TARGET_POOL_DNE;[ int Objecter::_calc_target(op_target_t *t, bool any_change) ]



bool AbstractAioObjectWrite::should_complete(int r)
        send_write_op();[ void AbstractAioObjectWrite::send_write_op() ]
                int r = m_ictx->data_ctx.aio_operate(m_oid, rados_completion, &m_write, m_snap_seq, m_snaps, flags);[ int librados::IoCtx::aio_operate(const std::string& oid, AioCompletion *c, librados::ObjectWriteOperation *o, snap_t snap_seq, std::vector<snap_t>& snaps, int flags) ]

猜你喜欢

转载自blog.csdn.net/Hello_NB1/article/details/59117162
今日推荐