Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
object.c File Reference
#include <linux/module.h>
#include "internal.h"

Go to the source code of this file.

Macros

#define FSCACHE_DEBUG_LEVEL   COOKIE
 

Functions

 EXPORT_SYMBOL (fscache_object_states)
 
void fscache_object_work_func (struct work_struct *work)
 
 EXPORT_SYMBOL (fscache_object_work_func)
 
void fscache_object_lookup_negative (struct fscache_object *object)
 
 EXPORT_SYMBOL (fscache_object_lookup_negative)
 
void fscache_obtained_object (struct fscache_object *object)
 
 EXPORT_SYMBOL (fscache_obtained_object)
 
void fscache_withdrawing_object (struct fscache_cache *cache, struct fscache_object *object)
 
void fscache_enqueue_object (struct fscache_object *object)
 
bool fscache_object_sleep_till_congested (signed long *timeoutp)
 
 EXPORT_SYMBOL_GPL (fscache_object_sleep_till_congested)
 
enum fscache_checkaux fscache_check_aux (struct fscache_object *object, const void *data, uint16_t datalen)
 
 EXPORT_SYMBOL (fscache_check_aux)
 

Variables

const charfscache_object_states [FSCACHE_OBJECT__NSTATES]
 
const char fscache_object_states_short [FSCACHE_OBJECT__NSTATES][5]
 

Macro Definition Documentation

#define FSCACHE_DEBUG_LEVEL   COOKIE

Definition at line 15 of file object.c.

Function Documentation

EXPORT_SYMBOL ( fscache_object_states  )
EXPORT_SYMBOL ( fscache_object_work_func  )
EXPORT_SYMBOL ( fscache_object_lookup_negative  )
EXPORT_SYMBOL ( fscache_obtained_object  )
EXPORT_SYMBOL ( fscache_check_aux  )
EXPORT_SYMBOL_GPL ( fscache_object_sleep_till_congested  )
enum fscache_checkaux fscache_check_aux ( struct fscache_object object,
const void data,
uint16_t  datalen 
)

fscache_check_aux - Ask the netfs whether an object on disk is still valid : The object to ask about : The auxiliary data for the object : The size of the auxiliary data

This function consults the netfs about the coherency state of an object

Definition at line 858 of file object.c.

void fscache_enqueue_object ( struct fscache_object object)

Definition at line 753 of file object.c.

void fscache_object_lookup_negative ( struct fscache_object object)

fscache_object_lookup_negative - Note negative cookie lookup : Object pointing to cookie to mark

Note negative lookup, permitting those waiting to read data from an already existing backing object to continue as there's no data for them to read.

Definition at line 489 of file object.c.

bool fscache_object_sleep_till_congested ( signed long timeoutp)

fscache_object_sleep_till_congested - Sleep until object wq is congested : Scheduler sleep timeout

Allow an object handler to sleep until the object workqueue is congested.

The caller must set up a wake up event before calling this and must have set the appropriate sleep mode (such as TASK_UNINTERRUPTIBLE) and tested its own condition before calling this function as no test is made here.

true is returned if the object wq is congested, false otherwise.

Definition at line 783 of file object.c.

void fscache_object_work_func ( struct work_struct work)

Definition at line 332 of file object.c.

void fscache_obtained_object ( struct fscache_object object)

fscache_obtained_object - Note successful object lookup or creation : Object pointing to cookie to mark

Note successful lookup and/or creation, permitting those waiting to write data to a backing object to continue.

Note that after calling this, an object's cookie may be relinquished by the netfs, and so must be accessed with object lock held.

Definition at line 533 of file object.c.

void fscache_withdrawing_object ( struct fscache_cache cache,
struct fscache_object object 
)

Definition at line 707 of file object.c.

Variable Documentation

const char* fscache_object_states[FSCACHE_OBJECT__NSTATES]
Initial value:
= {
[FSCACHE_OBJECT_INIT] = "OBJECT_INIT",
[FSCACHE_OBJECT_LOOKING_UP] = "OBJECT_LOOKING_UP",
[FSCACHE_OBJECT_CREATING] = "OBJECT_CREATING",
[FSCACHE_OBJECT_AVAILABLE] = "OBJECT_AVAILABLE",
[FSCACHE_OBJECT_ACTIVE] = "OBJECT_ACTIVE",
[FSCACHE_OBJECT_UPDATING] = "OBJECT_UPDATING",
[FSCACHE_OBJECT_DYING] = "OBJECT_DYING",
[FSCACHE_OBJECT_LC_DYING] = "OBJECT_LC_DYING",
[FSCACHE_OBJECT_ABORT_INIT] = "OBJECT_ABORT_INIT",
[FSCACHE_OBJECT_RELEASING] = "OBJECT_RELEASING",
[FSCACHE_OBJECT_RECYCLING] = "OBJECT_RECYCLING",
[FSCACHE_OBJECT_WITHDRAWING] = "OBJECT_WITHDRAWING",
[FSCACHE_OBJECT_DEAD] = "OBJECT_DEAD",
}

Definition at line 19 of file object.c.

const char fscache_object_states_short[FSCACHE_OBJECT__NSTATES][5]
Initial value:
= {
[FSCACHE_OBJECT_INIT] = "INIT",
[FSCACHE_OBJECT_LOOKING_UP] = "LOOK",
[FSCACHE_OBJECT_CREATING] = "CRTN",
[FSCACHE_OBJECT_AVAILABLE] = "AVBL",
[FSCACHE_OBJECT_ACTIVE] = "ACTV",
[FSCACHE_OBJECT_UPDATING] = "UPDT",
[FSCACHE_OBJECT_DYING] = "DYNG",
[FSCACHE_OBJECT_LC_DYING] = "LCDY",
[FSCACHE_OBJECT_ABORT_INIT] = "ABTI",
[FSCACHE_OBJECT_RELEASING] = "RELS",
[FSCACHE_OBJECT_RECYCLING] = "RCYC",
[FSCACHE_OBJECT_WITHDRAWING] = "WTHD",
[FSCACHE_OBJECT_DEAD] = "DEAD",
}

Definition at line 36 of file object.c.