<font class="Apple-style-span" color="#3333FF" face="'times new roman', serif"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial; "><font class="Apple-style-span" color="#3333FF"><font class="Apple-style-span" face="'trebuchet ms', sans-serif">Thanks a lot Alexey for the reply.The information will be really useful.</font></font></span></font><div>

<font class="Apple-style-span" color="#3333FF" face="'times new roman', serif"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial; "><font class="Apple-style-span" color="#3333FF"><font class="Apple-style-span" face="'trebuchet ms', sans-serif"></font></font><div>

<font class="Apple-style-span" color="#3333FF"><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><br></font></font></div><div><font class="Apple-style-span" color="#3333FF"><font class="Apple-style-span" face="'trebuchet ms', sans-serif">Since I am using 1.8.1.1 for my research project I will have to rely on the old API.Since in the source tree prior to 2.0 we do not have a mdt/mdt_handler.c and layout.c files will have to work with the low level buffer management structures(ptlrpc_request,lustre_msg_v2,etc).Do you know a place or a function which make use of the old API which I can use as a reference to write the RPC for my task.</font></font></div>

<div><font class="Apple-style-span" color="#3333FF"><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><br></font></font></div><div><font class="Apple-style-span" color="#3333FF"><font class="Apple-style-span" face="'trebuchet ms', sans-serif">Thanks,</font></font></div>

<div><font class="Apple-style-span" color="#3333FF"><font class="Apple-style-span" face="'trebuchet ms', sans-serif">Vilobh</font></font></div><div><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><font class="Apple-style-span" color="#3333FF"></font></font><i><font size="2" style="color: rgb(51, 51, 255); "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">Graduate Research Associate</font></font></i></div>

<div><i><font size="2" style="color: rgb(51, 51, 255); "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">Department of Computer Science</font></font></i></div><div><i><font size="2" style="color: rgb(51, 51, 255); "><font class="Apple-style-span" face="'trebuchet ms', sans-serif">The Ohio State University Columbus Ohio</font></font></i></div>

<div></div></span></font><br><br><div class="gmail_quote">On Wed, Oct 13, 2010 at 12:20 AM, Alexey Lyashkov <span dir="ltr"><<a href="mailto:alexey.lyashkov@clusterstor.com">alexey.lyashkov@clusterstor.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><br><div><div class="im"><div>On Oct 13, 2010, at 07:06, Vilobh Meshram wrote:</div>

<br><blockquote type="cite"><font color="#3333FF"><font face="'trebuchet ms', sans-serif">Thanks Alexey for the reply.Thanks a lot.</font></font><div><font color="#3333FF"><font face="'trebuchet ms', sans-serif"><br>



</font></font></div><div><font color="#3333FF"><font face="'trebuchet ms', sans-serif">I will try out the steps mentioned by you and see if I can add a new RPC for the task which I am thinking of to implement in Lustre.</font></font></div>



<div><font color="#3333FF"><font face="'trebuchet ms', sans-serif"><br></font></font><div><font color="#3333FF"><font face="'trebuchet ms', sans-serif">The RPC of which I am thinking of will not return the lock to the caller.Yes that rpc will have special code to reconstruct in replay phase.</font></font></div>

</div></blockquote></div><div>In that case possible you need look to 'setattr' functions - it have own mdt_reconstruct_setattr reconstructor, but that is need support on client side.</div><div>typically that say - you need have special field in message to copy data from server reply.</div>

<div class="im"><br><blockquote type="cite"><div>

<div><font color="#3333FF"><font face="'trebuchet ms', sans-serif"><br></font></font></div><div><font color="#3333FF"><font face="'trebuchet ms', sans-serif">Just a last question from which release of Lustre can we make use of the new API.</font></font></div>

</div></blockquote><blockquote type="cite"><div><div><font color="#3333FF"><font face="'trebuchet ms', sans-serif">Is their any documentation which lists the use of the new API.If yes can you please point me to that ?</font></font></div>

</div></blockquote></div><div>lustre 1.x have a old PtlRPC API, lustre 2.0 have a mix of new and old, but have a migrate to use new API.</div><div><div></div><div class="h5"><br><blockquote type="cite"><div>

<div><font color="#3333FF"><font face="'trebuchet ms', sans-serif"><br></font></font></div><div><font color="#3333FF"><font face="'trebuchet ms', sans-serif">Thanks again.</font></font></div>

<div><font color="#3333FF"><font face="'trebuchet ms', sans-serif"><br></font></font></div><div><font color="#3333FF"><font face="'trebuchet ms', sans-serif">Thanks,</font></font></div>

<div><font color="#3333FF"><font face="'trebuchet ms', sans-serif">Vilobh</font></font></div><div><font face="'trebuchet ms', sans-serif"><font color="#3333FF"></font></font><i><font style="color:rgb(51, 51, 255)"><font face="'trebuchet ms', sans-serif">Graduate Research Associate</font></font></i></div>



<div><i><font face="'trebuchet ms', sans-serif"><font style="color:rgb(51, 51, 255)"></font></font></i><i><font style="color:rgb(51, 51, 255)"><font face="'trebuchet ms', sans-serif">Department of Computer Science</font></font></i></div>



<div><i><font face="'trebuchet ms', sans-serif"><font style="color:rgb(51, 51, 255)"></font></font></i><i><font style="color:rgb(51, 51, 255)"><font face="'trebuchet ms', sans-serif">The Ohio State University Columbus Ohio</font></font></i></div>



<div><br><div class="gmail_quote">On Tue, Oct 12, 2010 at 11:46 PM, Alexey Lyashkov <span dir="ltr"><<a href="mailto:alexey.lyashkov@clusterstor.com" target="_blank">alexey.lyashkov@clusterstor.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div style="word-wrap:break-word"><div><div>That is depend of rpc type - is that RPC want to be return lock to caller or not, and is that rpc want to have special code to reconstruct in replay phase.</div><div>in general you need look to mdt/mdt_handler.c. mdt_get_info is good example of simple rpc processing - but it use new PtlRPC api.</div>



<div>that is API hide of low level request structures and provide api to access to message buffer by identifier.</div><div>to use that API you need define structure of own message in ptlrpc/layout.c, and own command in enum mds_cmd_t, adjust array with commands and write own handler.</div>



<div><div></div><div><div><br></div><div><br></div><div><div><div>On Oct 13, 2010, at 01:17, Vilobh Meshram wrote:</div><blockquote type="cite"><font color="#3333ff"><font size="2"><font face="times new roman,serif">Thanks <a href="http://Alexey.It/" target="_blank">Alexey.It</a> was helpful.<br>



<br>I have one more question :-<br><br>If we want to add a new RPC with a new opcode are there any guidlines to be followed in the Lustre File System.<br>

<br>Also ,<br>1)How does the MDS process the ptlrpc_request i.e how does the MDS extract the buffer information from the ptlrpc_message.<br>2)For every new RPC is the message length which is to be sent on wire ( including the fixed header size + the buffer size) dependent on the number of buffers in the lustre request message i.e the count field in the ptlrpc_prep_req() or the size of the size[] array.<br>





<br><br clear="all"></font></font></font><font color="#3333ff"><font face="'times new roman', serif">Thanks,<br>Vilobh<br></font></font><i><font style="color:rgb(51, 51, 255)" size="2">Graduate Research Associate<br>





Department of Computer Science<br>The Ohio State University Columbus Ohio</font></i><br>
<br><br><div class="gmail_quote">On Tue, Oct 12, 2010 at 2:21 PM, Alexey Lyashkov <span dir="ltr"><<a href="mailto:alexey.lyashkov@clusterstor.com" target="_blank">alexey.lyashkov@clusterstor.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">

<div style="word-wrap:break-word">Hi Vilobh,<div><br></div><div>ldlm_cli_cancel_req is good example to use old PtlRPC API.</div><div>for first you need allocate request buffer via ptlrpc_prep_req</div><div>next is - allocate reply buffer via ptlrpc_req_set_repsize</div>





<div>next - call ptlrpc_queue_wait to send message and wait reply.</div><div><br></div><div>osc_getattr_async good example for new PtlRPC API and async RPC processing.</div><div><br></div><div>if that isn't help you - please show a yours code to find a error.</div>





<div><br><div><div><div></div><div><div>On Oct 12, 2010, at 20:55, Vilobh Meshram wrote:</div><br></div></div><blockquote type="cite"><div><div></div><div><font style="color:rgb(51, 51, 255)" size="2" color="#3333ff"><font face="times new roman,serif">I
want to understand the message encoding and decoding logic in lustre.I
am planning to send a request to the MDS and based on the reply from MDs want to populate the <br><br>   struct lustre_msg *rq_repbuf; /* client only, buf may be bigger than msg */<br>   struct lustre_msg *rq_repmsg;<br>







<br>I am trying this for a simple "Hello" message but not seeing the expected output.Sometime I even see Kernel Crash.<br>If you can please give me some insight on the way the Lustre File
system encodes decodes the messages sent accross nodes it would be
helpful.</font></font><font style="color:rgb(51, 51, 255)" size="2"><br><br clear="all"></font><font style="color:rgb(51, 51, 255)" size="2" color="#3333ff"><font face="'times new roman', serif">Thanks,<br>Vilobh<br>







</font></font><i><font style="color:rgb(51, 51, 255)" size="2">Graduate Research Associate<br>Department of Computer Science<br>The Ohio State University Columbus Ohio</font></i><br></div></div>
_______________________________________________<br>Lustre-devel mailing list<br><a href="mailto:Lustre-devel@lists.lustre.org" target="_blank">Lustre-devel@lists.lustre.org</a><br><a href="http://lists.lustre.org/mailman/listinfo/lustre-devel" target="_blank">http://lists.lustre.org/mailman/listinfo/lustre-devel</a><br>





</blockquote></div><br></div></div></blockquote></div><br>
</blockquote></div><br></div></div></div></div></div></blockquote></div><br></div></div>
</blockquote></div></div></div><br></div></blockquote></div><br></div>