clio

Client objects implement io operations and cache pages. More...


Modules

 cl_object
 cl_page
 cl_lock
 cl_io
 cl_page_list
 Page list used to perform collective operations on a group of pages.
 cl_req
 cl_env
 lu_env handling for a client.

Data Structures

struct  cl_device_operations
 Operations for each data device in the client stack. More...
struct  cl_device
 Device in the client stack. More...
struct  cache_stats
 Stats for a generic cache (similar to inode, lu_object, etc. More...
struct  cl_site
 Client-side site. More...

helpers

Type conversion and accessory functions.

void cl_page_slice_add (struct cl_page *page, struct cl_page_slice *slice, struct cl_object *obj, const struct cl_page_operations *ops)
 Adds page slice to the compound page.
void cl_lock_slice_add (struct cl_lock *lock, struct cl_lock_slice *slice, struct cl_object *obj, const struct cl_lock_operations *ops)
 Adds lock slice to the compound lock.
void cl_io_slice_add (struct cl_io *io, struct cl_io_slice *slice, struct cl_object *obj, const struct cl_io_operations *ops)
 Adds io slice to the cl_io.
void cl_req_slice_add (struct cl_req *req, struct cl_req_slice *slice, struct cl_device *dev, const struct cl_req_operations *ops)
 Adds request slice to the compound request.

Defines

#define pgoff_t   unsigned long
#define CL_PAGE_EOF   ((pgoff_t)~0ull)

Functions

void cache_stats_init (struct cache_stats *cs, const char *name)
 These are not exported so far.
int cache_stats_print (const struct cache_stats *cs, char *page, int count, int header)
int cl_site_init (struct cl_site *s, struct cl_device *top)
 Initialize client site.
void cl_site_fini (struct cl_site *s)
 Finalize client site.
void cl_stack_fini (const struct lu_env *env, struct cl_device *cl)
 Finalize device stack by calling lu_stack_fini().
int cl_site_stats_print (const struct cl_site *s, char *page, int count)
 Output client site statistical counters into a buffer.
void cl_attr2lvb (struct ost_lvb *lvb, const struct cl_attr *attr)
 Converts struct cl_attr to struct ost_lvb.
void cl_lvb2attr (struct cl_attr *attr, const struct ost_lvb *lvb)
 Converts struct ost_lvb to struct cl_attr.
cl_devicecl_type_setup (const struct lu_env *env, struct lu_site *site, struct lu_device_type *ldt, struct lu_device *next)

Detailed Description

Client objects implement io operations and cache pages.

Examples: lov and osc are implementations of cl interface.

Big Theory Statement.

Layered objects.

Client implementation is based on the following data-types:

Terminology

Locking.

See the top comment in cl_object.c for the description of overall locking and reference-counting design.

See comments below for the description of i/o, page, and dlm-locking design.


Function Documentation

void cl_attr2lvb ( struct ost_lvb *  lvb,
const struct cl_attr attr 
)

Converts struct cl_attr to struct ost_lvb.

See also:
cl_lvb2attr

void cl_io_slice_add ( struct cl_io io,
struct cl_io_slice slice,
struct cl_object obj,
const struct cl_io_operations ops 
)

Adds io slice to the cl_io.

This is called by cl_object_operations::coo_io_init() methods to add a per-layer state to the io. New state is added at the end of cl_io::ci_layers list, that is, it is at the bottom of the stack.

See also:
cl_lock_slice_add(), cl_req_slice_add(), cl_page_slice_add()

void cl_lock_slice_add ( struct cl_lock lock,
struct cl_lock_slice slice,
struct cl_object obj,
const struct cl_lock_operations ops 
)

Adds lock slice to the compound lock.

This is called by cl_object_operations::coo_lock_init() methods to add a per-layer state to the lock. New state is added at the end of cl_lock::cll_layers list, that is, it is at the bottom of the stack.

See also:
cl_req_slice_add(), cl_page_slice_add(), cl_io_slice_add()

void cl_lvb2attr ( struct cl_attr attr,
const struct ost_lvb *  lvb 
)

Converts struct ost_lvb to struct cl_attr.

See also:
cl_attr2lvb

void cl_page_slice_add ( struct cl_page page,
struct cl_page_slice slice,
struct cl_object obj,
const struct cl_page_operations ops 
)

Adds page slice to the compound page.

This is called by cl_object_operations::coo_page_init() methods to add a per-layer state to the page. New state is added at the end of cl_page::cp_layers list, that is, it is at the bottom of the stack.

See also:
cl_lock_slice_add(), cl_req_slice_add(), cl_io_slice_add()

void cl_req_slice_add ( struct cl_req req,
struct cl_req_slice slice,
struct cl_device dev,
const struct cl_req_operations ops 
)

Adds request slice to the compound request.

This is called by cl_device_operations::cdo_req_init() methods to add a per-layer state to the request. New state is added at the end of cl_req::crq_layers list, that is, it is at the bottom of the stack.

See also:
cl_lock_slice_add(), cl_page_slice_add(), cl_io_slice_add()

void cl_site_fini ( struct cl_site s  ) 

Finalize client site.

Dual to cl_site_init().

int cl_site_init ( struct cl_site s,
struct cl_device d 
)

Initialize client site.

Perform common initialization (lu_site_init()), and initialize statistical counters. Also perform global initializations on the first call.

int cl_site_stats_print ( const struct cl_site site,
char *  page,
int  count 
)

Output client site statistical counters into a buffer.

Suitable for ll_rd_*()-style functions.


Generated on Mon Apr 12 04:18:21 2010 for Lustre 1.10.0.40-0-g9a80ff7 by doxygen 1.4.7

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