|lu_context is used on the client side too. |
|Pointer to the home service thread. |
|Pointer to an array with key values. |
|Linkage into a list of all remembered contexts. |
|Version counter used to skip calls to lu_context_refill() when no keys were registered. |
|Debugging cookie. |
Execution context for lu_object methods. Currently associated with thread.
All lu_object methods, except device and device type methods (called during system initialization and shutdown) are executed "within" some lu_context. This means, that pointer to some "current" lu_context is passed as an argument to all methods.
All service ptlrpc threads create lu_context as part of their initialization. It is possible to create "stand-alone" context for other execution environments (like system calls).
lu_object methods mainly use lu_context through lu_context_key interface that allows each layer to associate arbitrary pieces of data with each context (see pthread_key_create(3) for similar interface).
On a client, lu_context is bound to a thread, see cl_env_get().
Linkage into a list of all remembered contexts.
Only `non-transient' contexts, i.e., ones created for service threads are placed here.
lu_context is used on the client side too.
Yet we don't want to allocate values of server-side keys for the client contexts and vice versa.
To achieve this, set of tags in introduced. Contexts and keys are marked with tags. Key value are created only for context whose set of tags has non-empty intersection with one for key. Tags are taken from enum lu_context_tag.
|struct ptlrpc_thread* lu_context::lc_thread|
Pointer to the home service thread.
NULL for other execution contexts.
Pointer to an array with key values.
Internal implementation detail.