[Lustre-discuss] Printing the data in OST code

Jack David
Wed, 22 Feb 2012 10:25:32 -0000

On Tue, Feb 21, 2012 at 8:14 PM, Jack David <jd6589 at gmail.com>
wrote:
> On Tue, Feb 21, 2012 at 8:13 PM, Jack David <jd6589 at gmail.com>
wrote:
>> Hi All,
>>
>> I am trying to analyze the OSC-OST communication by putting some
>> prints in the code. Basically I want to print the data that is sent by
>> OSC and received by OST. But I am not able to print the correct, may
>> be because of I am not printing the correct buffers. Please correct me
>> in the following approach which I have taken.
>>
>> On the OST side, whenever the OST_WRITE request comes, following code
>> path is taken
>>
>> ost_brw_write()
>> -- target_bulk_io()
>> -- -- ptlrpc_start_bulk_transfer()
>> -- -- -- LNetGet()
>>
>> In the ptlrpc_start_bulk_transfer(), the "desc" parameter
contains the
>> pages and that is filled into the "MD". I assume if I print
those
>> pages at this point (before calling LNetGet()), I will not get the
>> data.
>>
>> Once the LNetGet() is called, the GET request will be served by lower
>> layer and lnet_finalize() will be invoked as a call back routine to
>> notify that the operation is complete. In "lnet_finalize()",
I am
>> filtering the "msg" (passed in as parameter) with type
LNET_MSG_GET to
>> pin point the correct "msg". This struct "msg" will
contain the
>> "lnet_libmd_t" type of MD which will have the kiov as well as
"start"
>> buffer. If I print that buffer, still the data is garbage.
>>

I figured out that the completion of GET message will not contain the
data, but the buffers will be filled as a part of REPLY message (which
is generated in response to GET command). When I tried to print the
buffers in lnet_finalize() for msg type as LNET_MSG_REPLY, I could
print the data.

Thanks,
J

>> I would appreciate any help on this issue.
>>
>> Thanks,
>> J
>
> Forgot to mention that Lustre MDS, OSS and Lustre Client are on the
> same machine.
>
> --
> J



--
J