Linux Kernel
3.7.1
|
Go to the source code of this file.
Data Structures | |
struct | fscache_cache_tag |
struct | fscache_cache |
struct | fscache_operation |
struct | fscache_retrieval |
struct | fscache_storage |
struct | fscache_cache_ops |
struct | fscache_cookie |
struct | fscache_object |
Macros | |
#define | NR_MAXCACHES BITS_PER_LONG |
#define | FSCACHE_TAG_RESERVED 0 /* T if tag is reserved for a cache */ |
#define | FSCACHE_IOERROR 0 /* cache stopped on I/O error */ |
#define | FSCACHE_CACHE_WITHDRAWN 1 /* cache has been withdrawn */ |
#define | FSCACHE_OP_TYPE 0x000f /* operation type */ |
#define | FSCACHE_OP_ASYNC 0x0001 /* - async op, processor may sleep for disk */ |
#define | FSCACHE_OP_MYTHREAD 0x0002 /* - processing is done be issuing thread, not pool */ |
#define | FSCACHE_OP_WAITING 4 /* cleared when op is woken */ |
#define | FSCACHE_OP_EXCLUSIVE 5 /* exclusive op, other ops must wait */ |
#define | FSCACHE_OP_DEAD 6 /* op is now dead */ |
#define | FSCACHE_OP_DEC_READ_CNT 7 /* decrement object->n_reads on destruction */ |
#define | FSCACHE_OP_KEEP_FLAGS 0xc0 /* flags to keep when repurposing an op */ |
#define | FSCACHE_COOKIE_PENDING_TAG 0 /* pages tag: pending write to cache */ |
#define | FSCACHE_COOKIE_STORING_TAG 1 /* pages tag: writing to cache */ |
#define | FSCACHE_COOKIE_LOOKING_UP 0 /* T if non-index cookie being looked up still */ |
#define | FSCACHE_COOKIE_CREATING 1 /* T if non-index object being created still */ |
#define | FSCACHE_COOKIE_NO_DATA_YET 2 /* T if new object with no cached data yet */ |
#define | FSCACHE_COOKIE_PENDING_FILL 3 /* T if pending initial fill on object */ |
#define | FSCACHE_COOKIE_FILLING 4 /* T if filling object incrementally */ |
#define | FSCACHE_COOKIE_UNAVAILABLE 5 /* T if cookie is unavailable (error, etc) */ |
#define | FSCACHE_OBJECT_EV_REQUEUE 0 /* T if object should be requeued */ |
#define | FSCACHE_OBJECT_EV_UPDATE 1 /* T if object should be updated */ |
#define | FSCACHE_OBJECT_EV_CLEARED 2 /* T if accessors all gone */ |
#define | FSCACHE_OBJECT_EV_ERROR 3 /* T if fatal error occurred during processing */ |
#define | FSCACHE_OBJECT_EV_RELEASE 4 /* T if netfs requested object release */ |
#define | FSCACHE_OBJECT_EV_RETIRE 5 /* T if netfs requested object retirement */ |
#define | FSCACHE_OBJECT_EV_WITHDRAW 6 /* T if cache requested object withdrawal */ |
#define | FSCACHE_OBJECT_EVENTS_MASK 0x7f /* mask of all events*/ |
#define | FSCACHE_OBJECT_LOCK 0 /* T if object is busy being processed */ |
#define | FSCACHE_OBJECT_PENDING_WRITE 1 /* T if object has pending write */ |
#define | FSCACHE_OBJECT_WAITING 2 /* T if object is waiting on its parent */ |
#define | fscache_object_is_active(obj) |
#define | fscache_object_is_dead(obj) |
#define | fscache_object_destroy(object) do {} while(0) |
Typedefs | |
typedef void(* | fscache_operation_release_t )(struct fscache_operation *op) |
typedef void(* | fscache_operation_processor_t )(struct fscache_operation *op) |
typedef int(* | fscache_page_retrieval_func_t )(struct fscache_retrieval *op, struct page *page, gfp_t gfp) |
typedef int(* | fscache_pages_retrieval_func_t )(struct fscache_retrieval *op, struct list_head *pages, unsigned *nr_pages, gfp_t gfp) |
Functions | |
void | fscache_op_work_func (struct work_struct *work) |
void | fscache_enqueue_operation (struct fscache_operation *) |
void | fscache_put_operation (struct fscache_operation *) |
void | fscache_object_work_func (struct work_struct *work) |
void | fscache_object_lookup_negative (struct fscache_object *object) |
void | fscache_obtained_object (struct fscache_object *object) |
__printf (3, 4) void fscache_init_cache(struct fscache_cache *cache | |
struct fscache_cache_ops const char int | fscache_add_cache (struct fscache_cache *cache, struct fscache_object *fsdef, const char *tagname) |
void | fscache_withdraw_cache (struct fscache_cache *cache) |
void | fscache_io_error (struct fscache_cache *cache) |
void | fscache_mark_pages_cached (struct fscache_retrieval *op, struct pagevec *pagevec) |
bool | fscache_object_sleep_till_congested (signed long *timeoutp) |
enum fscache_checkaux | fscache_check_aux (struct fscache_object *object, const void *data, uint16_t datalen) |
#define FSCACHE_CACHE_WITHDRAWN 1 /* cache has been withdrawn */ |
Definition at line 65 of file fscache-cache.h.
Definition at line 299 of file fscache-cache.h.
Definition at line 302 of file fscache-cache.h.
Definition at line 298 of file fscache-cache.h.
Definition at line 300 of file fscache-cache.h.
Definition at line 301 of file fscache-cache.h.
Definition at line 294 of file fscache-cache.h.
Definition at line 295 of file fscache-cache.h.
Definition at line 303 of file fscache-cache.h.
Definition at line 64 of file fscache-cache.h.
#define fscache_object_destroy | ( | object | ) | do {} while(0) |
Definition at line 430 of file fscache-cache.h.
Definition at line 348 of file fscache-cache.h.
Definition at line 349 of file fscache-cache.h.
Definition at line 350 of file fscache-cache.h.
Definition at line 346 of file fscache-cache.h.
Definition at line 351 of file fscache-cache.h.
Definition at line 347 of file fscache-cache.h.
Definition at line 352 of file fscache-cache.h.
#define FSCACHE_OBJECT_EVENTS_MASK 0x7f /* mask of all events*/ |
Definition at line 353 of file fscache-cache.h.
#define fscache_object_is_active | ( | obj | ) |
Definition at line 378 of file fscache-cache.h.
#define fscache_object_is_dead | ( | obj | ) |
Definition at line 383 of file fscache-cache.h.
Definition at line 356 of file fscache-cache.h.
Definition at line 357 of file fscache-cache.h.
Definition at line 358 of file fscache-cache.h.
#define FSCACHE_OP_ASYNC 0x0001 /* - async op, processor may sleep for disk */ |
Definition at line 85 of file fscache-cache.h.
Definition at line 89 of file fscache-cache.h.
#define FSCACHE_OP_DEC_READ_CNT 7 /* decrement object->n_reads on destruction */ |
Definition at line 90 of file fscache-cache.h.
Definition at line 88 of file fscache-cache.h.
#define FSCACHE_OP_KEEP_FLAGS 0xc0 /* flags to keep when repurposing an op */ |
Definition at line 91 of file fscache-cache.h.
#define FSCACHE_OP_MYTHREAD 0x0002 /* - processing is done be issuing thread, not pool */ |
Definition at line 86 of file fscache-cache.h.
#define FSCACHE_OP_TYPE 0x000f /* operation type */ |
Definition at line 84 of file fscache-cache.h.
Definition at line 87 of file fscache-cache.h.
Definition at line 39 of file fscache-cache.h.
#define NR_MAXCACHES BITS_PER_LONG |
Definition at line 25 of file fscache-cache.h.
typedef void(* fscache_operation_processor_t)(struct fscache_operation *op) |
Definition at line 76 of file fscache-cache.h.
typedef void(* fscache_operation_release_t)(struct fscache_operation *op) |
Definition at line 75 of file fscache-cache.h.
typedef int(* fscache_page_retrieval_func_t)(struct fscache_retrieval *op, struct page *page, gfp_t gfp) |
Definition at line 143 of file fscache-cache.h.
typedef int(* fscache_pages_retrieval_func_t)(struct fscache_retrieval *op, struct list_head *pages, unsigned *nr_pages, gfp_t gfp) |
Definition at line 147 of file fscache-cache.h.
__printf | ( | 3 | , |
4 | |||
) |
struct fscache_cache_ops const char int fscache_add_cache | ( | struct fscache_cache * | cache, |
struct fscache_object * | ifsdef, | ||
const char * | tagname | ||
) |
fscache_add_cache - Declare a cache as being open for business : The record describing the cache : The record of the cache object describing the top-level index : The tag describing this cache
Add a cache to the system, making it available for netfs's to use.
See Documentation/filesystems/caching/backend-api.txt for a complete description.
enum fscache_checkaux fscache_check_aux | ( | struct fscache_object * | object, |
const void * | data, | ||
uint16_t | datalen | ||
) |
void fscache_enqueue_operation | ( | struct fscache_operation * | op | ) |
fscache_enqueue_operation - Enqueue an operation for processing : The operation to enqueue
Enqueue an operation for processing by the FS-Cache thread pool.
This will get its own ref on the object.
Definition at line 31 of file operation.c.
void fscache_io_error | ( | struct fscache_cache * | cache | ) |
fscache_io_error - Note a cache I/O error : The record describing the cache
Note that an I/O error occurred in a cache and that it should no longer be used for anything. This also reports the error into the kernel log.
See Documentation/filesystems/caching/backend-api.txt for a complete description.
void fscache_mark_pages_cached | ( | struct fscache_retrieval * | op, |
struct pagevec * | pagevec | ||
) |
void fscache_object_lookup_negative | ( | struct fscache_object * | object | ) |
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.
void fscache_object_work_func | ( | struct work_struct * | work | ) |
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.
void fscache_op_work_func | ( | struct work_struct * | work | ) |
Definition at line 447 of file operation.c.
void fscache_put_operation | ( | struct fscache_operation * | ) |
Definition at line 317 of file operation.c.
void fscache_withdraw_cache | ( | struct fscache_cache * | cache | ) |
wait_queue_head_t fscache_cache_cleared_wq |
struct fscache_cookie fscache_fsdef_index |
atomic_t fscache_op_debug_id |
Definition at line 20 of file operation.c.
struct fscache_cache_ops const char* idfmt |
Definition at line 497 of file fscache-cache.h.
struct fscache_cache_ops* ops |
Definition at line 497 of file fscache-cache.h.