Hi Peng,
If you are interested in the code path of Ceph, these blogs may help:
How does a Ceph OSD handle a read message ? (in Firefly and up)
How does a Ceph OSD handle a write message ? (up to Emperor)


Here is the note about rados write I took when I read the source code:
| rados put <obj-name> [infile]
L [tools/rados/rados.cc] main()
L rados_tool_common()
L do_put()L io_ctx.write()
L io_ctx_impl->write()
L [librados/IoCtxImpl.cc] write()
L operate()
L op_submit()
L [osdc/Objecter.cc] op_submit()
L _op_submit()
L recalc_op_target()
send_op()
L messenger->send_message()
L [msg/SimpleMessenger.cc] _send_message()
L submit_message()
L pipe->_send()
L [msg/Pipe.h] _send()
L [msg/Pipe.cc] witer()
L write_message()
L do_sendmsg()
L sendmsg()

Hope these could help.

Regards,
Kai Zhang



At 2014-04-30 00:04:55,peng <peng....@qq.com> wrote:

In the librados.cc , I found the following code:
Step 1 .
file :  librados.cc 
void librados::ObjectWriteOperation::write(uint64_t off, const bufferlist& bl)
{
  ::ObjectOperation *o = (::ObjectOperation *)impl;
  bufferlist c = bl;
  o->write(off, c);
}
Step 2 .  to find  ::ObjectOperation   
File : Objecter.h
struct  ObjectOperation  {
       void  write( .. ) {}   //  call add_data
       void  add_data( .. ) {}  // call add_op 
       void  add_op(...)  {}  // need  OSDOp 
}
Step 3.  to find    OSDOp 
File : osd_types.h
struct OSDOp { ... } 
 
But , the question is : how to transfer the data to rados-cluster???    I 
assume that there will be some socket connection(tcp,etc)  to transfer data , 
but I find nothing about socket connection..
 
Besides,  I found something in IoCtxImpl.cc  and throught it I found  
ceph_tid_t Objecter::_op_submit(Op *op)   in Objecter.cc ..  It looks like the 
real operation is here. 
 
confused..Appreciate any help~!


------------------ 原始邮件 ------------------
发件人: "John Spray";<john.sp...@inktank.com>;
发送时间: 2014年4月29日(星期二) 下午5:59
收件人: "peng"<peng....@qq.com>;
抄送: "ceph-users"<ceph-users@lists.ceph.com>;
主题: Re: [ceph-users] Hey, Where can I find the source code of " 
classObjectOperationImpl " ?


It's not a real class, just a type definition used for the 
ObjectOperation::impl pointer.  The actual object is an ObjectOperation.


src/librados/librados.cc
1797:  impl = (ObjectOperationImpl *)new ::ObjectOperation;


John



On Tue, Apr 29, 2014 at 10:49 AM, peng <peng....@qq.com> wrote:

Hey,
I can find a declaration in librados.hpp ,  but when I try to find the source 
code of  ObjectOperatoinImpl , I find nothing ..
 
 
Is it a ghost class??
 
Confused.. Appreciate any help .

_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com



_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to