[Lustre-discuss] FW: Queries in Lustre code

Oleg Drokin green at whamcloud.com
Mon Jan 17 11:30:40 PST 2011


Hello!

On Jan 17, 2011, at 1:22 AM, Vilobh Meshram wrote:
> I am having some problem in understanding the role of following functions :-
> 
> it_disposition (There are various variants of this depending on the flag)

it_disposition is a function that checks if an RPC passed through a certain phase in server processing (identified by "flag"). Essentially a disposition is a bitmask of states.
To make things a bit more complicated, the client also uses the mask for its purposes after receiving the RPC reply to indicate if any extra cleanup actions need to be done on this RPC during 
cleanup (like releasing any extra RPC references).

> it_open_error

This function gets a a particular RPC phase argument, matches it against the actual phases through which RPCs went and if the phase matches one of the passed phases, returns RPC execution status.
I guess that sounds a bit confusing, so here is an example.
LEt's assume there are three phases in an open request: EXECD, LOOKUP and OPEN (corresponding to receiving and succesfully unpacking a request, looking up the file and then doing actual open).

Then if there was a problem during open, the call to it_open_error(DISP_OPEN_OPEN, it) would return that error, if the error happened earlier during the processing, somewhere in say request unpacking, that still makes open to fail, so it would return the same state.
But if say the request progressed to open phase and failed there, but we call it_open_error(DISP_LOOKUP_EXECD, it), the result would be 0 (= no error), since the unpackign went alright and the request was processed all the way to OPEN phase before the error happened.

Hope this helps.

Bye,
    Oleg


More information about the lustre-discuss mailing list