lov_object Struct Reference

lov-specific file state. More...

#include <lov_cl_internal.h>

Data Fields

cl_object lo_cl
cfs_rw_semaphore_t lo_type_guard
 Serializes object operations with transitions between layout types.
enum lov_layout_type lo_type
 Type of an object.
lov_object::lov_layout_state u
cfs_task_t * lo_owner
 Thread that acquired lov_object::lo_type_guard in an exclusive mode.

Data Structures

union  lov_layout_state

Detailed Description

lov-specific file state.

lov object has particular layout type, determining how top-object is built on top of sub-objects. Layout type can change dynamically. When this happens, lov_object::lo_type_guard semaphore is taken in exclusive mode, all state pertaining to the old layout type is destroyed, and new state is constructed. All object methods take said semaphore in the shared mode, providing serialization against transition between layout types.

To avoid multiple `if' or `switch' statements, selecting behavior for the current layout type, object methods perform double-dispatch, invoking function corresponding to the current layout type.

Field Documentation

enum lov_layout_type lov_object::lo_type

Type of an object.

Protected by lov_object::lo_type_guard.

cfs_rw_semaphore_t lov_object::lo_type_guard

Serializes object operations with transitions between layout types.

This semaphore is taken in shared mode by all object methods, and is taken in exclusive mode when object type is changed.

See also:

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.