FS-Cache: Add cache tag handling
Implement two features of FS-Cache: (1) The ability to request and release cache tags - names by which a cache may be known to a netfs, and thus selected for use. (2) An internal function by which a cache is selected by consulting the netfs, if the netfs wishes to be consulted. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Steve Dickson <steved@redhat.com> Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com> Acked-by: Al Viro <viro@zeniv.linux.org.uk> Tested-by: Daire Byrne <Daire.Byrne@framestore.com>
This commit is contained in:
@@ -27,6 +27,15 @@
|
||||
#define FSCACHE_MIN_THREADS 4
|
||||
#define FSCACHE_MAX_THREADS 32
|
||||
|
||||
/*
|
||||
* fsc-cache.c
|
||||
*/
|
||||
extern struct list_head fscache_cache_list;
|
||||
extern struct rw_semaphore fscache_addremove_sem;
|
||||
|
||||
extern struct fscache_cache *fscache_select_cache_for_object(
|
||||
struct fscache_cookie *);
|
||||
|
||||
/*
|
||||
* fsc-fsdef.c
|
||||
*/
|
||||
@@ -168,6 +177,17 @@ extern const struct file_operations fscache_stats_fops;
|
||||
#define fscache_stat(stat) do {} while (0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* raise an event on an object
|
||||
* - if the event is not masked for that object, then the object is
|
||||
* queued for attention by the thread pool.
|
||||
*/
|
||||
static inline void fscache_raise_event(struct fscache_object *object,
|
||||
unsigned event)
|
||||
{
|
||||
BUG(); // TODO
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*
|
||||
* debug tracing
|
||||
|
Reference in New Issue
Block a user