#ifndef _LINUX_FSCACHE_CACHE_H
#define _LINUX_FSCACHE_CACHE_H
#include <linux/fscache.h>
enum fscache_cache_trace;
enum fscache_cookie_trace;
enum fscache_access_trace;
enum fscache_volume_trace;
enum fscache_cache_state { … };
struct fscache_cache { … };
struct fscache_cache_ops { … };
extern struct workqueue_struct *fscache_wq;
extern wait_queue_head_t fscache_clearance_waiters;
extern struct rw_semaphore fscache_addremove_sem;
extern struct fscache_cache *fscache_acquire_cache(const char *name);
extern void fscache_relinquish_cache(struct fscache_cache *cache);
extern int fscache_add_cache(struct fscache_cache *cache,
const struct fscache_cache_ops *ops,
void *cache_priv);
extern void fscache_withdraw_cache(struct fscache_cache *cache);
extern void fscache_withdraw_volume(struct fscache_volume *volume);
extern void fscache_withdraw_cookie(struct fscache_cookie *cookie);
extern void fscache_io_error(struct fscache_cache *cache);
extern struct fscache_volume *
fscache_try_get_volume(struct fscache_volume *volume,
enum fscache_volume_trace where);
extern void fscache_put_volume(struct fscache_volume *volume,
enum fscache_volume_trace where);
extern void fscache_end_volume_access(struct fscache_volume *volume,
struct fscache_cookie *cookie,
enum fscache_access_trace why);
extern struct fscache_cookie *fscache_get_cookie(struct fscache_cookie *cookie,
enum fscache_cookie_trace where);
extern void fscache_put_cookie(struct fscache_cookie *cookie,
enum fscache_cookie_trace where);
extern void fscache_end_cookie_access(struct fscache_cookie *cookie,
enum fscache_access_trace why);
extern void fscache_cookie_lookup_negative(struct fscache_cookie *cookie);
extern void fscache_resume_after_invalidation(struct fscache_cookie *cookie);
extern void fscache_caching_failed(struct fscache_cookie *cookie);
extern bool fscache_wait_for_operation(struct netfs_cache_resources *cred,
enum fscache_want_state state);
static inline
enum fscache_cookie_state fscache_cookie_state(struct fscache_cookie *cookie)
{ … }
static inline void *fscache_get_key(struct fscache_cookie *cookie)
{ … }
static inline struct fscache_cookie *fscache_cres_cookie(struct netfs_cache_resources *cres)
{ … }
static inline void fscache_count_object(struct fscache_cache *cache)
{ … }
static inline void fscache_uncount_object(struct fscache_cache *cache)
{ … }
static inline void fscache_wait_for_objects(struct fscache_cache *cache)
{ … }
#ifdef CONFIG_FSCACHE_STATS
extern atomic_t fscache_n_read;
extern atomic_t fscache_n_write;
extern atomic_t fscache_n_no_write_space;
extern atomic_t fscache_n_no_create_space;
extern atomic_t fscache_n_culled;
extern atomic_t fscache_n_dio_misfit;
#define fscache_count_read() …
#define fscache_count_write() …
#define fscache_count_no_write_space() …
#define fscache_count_no_create_space() …
#define fscache_count_culled() …
#define fscache_count_dio_misfit() …
#else
#define fscache_count_read …
#define fscache_count_write …
#define fscache_count_no_write_space …
#define fscache_count_no_create_space …
#define fscache_count_culled …
#define fscache_count_dio_misfit …
#endif
#endif