lu_context Struct Reference

lu_context. More...

#include <lu_object.h>

Data Fields

__u32 lc_tags
 lu_context is used on the client side too.
ptlrpc_thread * lc_thread
 Pointer to the home service thread.
void ** lc_value
 Pointer to an array with key values.
enum lu_context_state lc_state
cfs_list_t lc_remember
 Linkage into a list of all remembered contexts.
unsigned lc_version
 Version counter used to skip calls to lu_context_refill() when no keys were registered.
unsigned lc_cookie
 Debugging cookie.

Detailed Description


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().

See also:

Field Documentation

cfs_list_t lu_context::lc_remember

Linkage into a list of all remembered contexts.

Only `non-transient' contexts, i.e., ones created for service threads are placed here.

__u32 lu_context::lc_tags

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.

void** lu_context::lc_value

Pointer to an array with key values.

Internal implementation detail.

The documentation for this struct was generated from the following file:
Generated on Mon Apr 12 04:18:22 2010 for Lustre by doxygen 1.4.7

Contact | About Sun | News | Employment | Privacy | Terms of Use | Trademarks | (C) 2008 Sun Microsystems, Inc.