osc


Data Structures

struct  osc_io
 State maintained by osc layer for each IO context. More...
struct  osc_req
 State of transfer for osc. More...
struct  osc_session
 State maintained by osc layer for the duration of a system call. More...
struct  osc_thread_info
struct  osc_object
struct  osc_lock
 osc-private state of cl_lock. More...
struct  osc_page
 Page state private for osc layer. More...

Defines

#define OSC_FLAGS   (ASYNC_URGENT|ASYNC_READY)
#define OSC_QUEUE_GRAIN   (32)
 How many pages osc_io_submit() queues before checking whether an RPC is ready.
#define osc_trunc_check(env, io, oio, size)   do {;} while (0)

Enumerations

enum  osc_lock_state {
  OLS_NEW, OLS_ENQUEUED, OLS_UPCALL_RECEIVED, OLS_GRANTED,
  OLS_RELEASED, OLS_BLOCKED, OLS_CANCELLED
}

Functions

int osc_lock_init (const struct lu_env *env, struct cl_object *obj, struct cl_lock *lock, const struct cl_io *io)
int osc_io_init (const struct lu_env *env, struct cl_object *obj, struct cl_io *io)
int osc_req_init (const struct lu_env *env, struct cl_device *dev, struct cl_req *req)
lu_objectosc_object_alloc (const struct lu_env *env, const struct lu_object_header *hdr, struct lu_device *dev)
cl_pageosc_page_init (const struct lu_env *env, struct cl_object *obj, struct cl_page *page, cfs_page_t *vmpage)
void osc_lock_build_res (const struct lu_env *env, const struct osc_object *obj, struct ldlm_res_id *resname)
void osc_index2policy (ldlm_policy_data_t *policy, const struct cl_object *obj, pgoff_t start, pgoff_t end)
int osc_lvb_print (const struct lu_env *env, void *cookie, lu_printer_t p, const struct ost_lvb *lvb)
void osc_io_submit_page (const struct lu_env *env, struct osc_io *oio, struct osc_page *opg, enum cl_req_type crt)
 Helper function called by osc_io_submit() for every page in an immediate transfer (i.e., transferred synchronously).
void osc_object_set_contended (struct osc_object *obj)
void osc_object_clear_contended (struct osc_object *obj)
int osc_object_is_contended (struct osc_object *obj)
int osc_lock_is_lockless (const struct osc_lock *olck)
 LU_TYPE_INIT_FINI (osc,&osc_key,&osc_session_key)
cl_pageosc_oap2cl_page (struct osc_async_page *oap)
void cl_lock_page_list_fixup (const struct lu_env *env, struct cl_io *io, struct cl_lock *lock, struct cl_page_list *queue)
 Returns a list of pages protected (only) by a given lock.
int osc_attr_set (const struct lu_env *env, struct cl_object *obj, const struct cl_attr *attr, unsigned valid)
void osc_page_clip (const struct lu_env *env, const struct cl_page_slice *slice, int from, int to)

Variables

cfs_mem_cache_t * osc_page_kmem
cfs_mem_cache_t * osc_lock_kmem
cfs_mem_cache_t * osc_object_kmem
cfs_mem_cache_t * osc_thread_kmem
cfs_mem_cache_t * osc_session_kmem
cfs_mem_cache_t * osc_req_kmem
lu_device_type osc_device_type
lu_context_key osc_key
lu_context_key osc_session_key
cfs_mem_cache_t * osc_page_kmem
cfs_mem_cache_t * osc_lock_kmem
cfs_mem_cache_t * osc_object_kmem
cfs_mem_cache_t * osc_thread_kmem
cfs_mem_cache_t * osc_session_kmem
cfs_mem_cache_t * osc_req_kmem
lu_kmem_descr osc_caches []
cfs_lock_class_key_t osc_ast_guard_class
lu_context_key osc_key
lu_context_key osc_session_key
lu_device_type osc_device_type
cfs_spinlock_t osc_ast_guard
 Global spin-lock protecting consistency of ldlm_lock::l_ast_data pointers.

Function Documentation

void cl_lock_page_list_fixup ( const struct lu_env env,
struct cl_io io,
struct cl_lock lock,
struct cl_page_list *  queue 
)

Returns a list of pages protected (only) by a given lock.

Scans an extent of page radix tree, corresponding to the lock and queues all pages that are not protected by locks other than lock into queue.


Variable Documentation

cfs_spinlock_t osc_ast_guard

Global spin-lock protecting consistency of ldlm_lock::l_ast_data pointers.

Initialized in osc_init().

struct lu_device_type osc_device_type

Initial value:

 {
        .ldt_tags     = LU_DEVICE_CL,
        .ldt_name     = LUSTRE_OSC_NAME,
        .ldt_ops      = &osc_device_type_ops,
        .ldt_ctx_tags = LCT_CL_THREAD
}

struct lu_context_key osc_key

Initial value:

 {
        .lct_tags = LCT_CL_THREAD,
        .lct_init = osc_key_init,
        .lct_fini = osc_key_fini
}

struct lu_context_key osc_session_key

Initial value:

 {
        .lct_tags = LCT_SESSION,
        .lct_init = osc_session_init,
        .lct_fini = osc_session_fini
}


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.