aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fscache-cache.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fscache-cache.h')
-rw-r--r--include/linux/fscache-cache.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h
index c57db27ac861..27c8df503152 100644
--- a/include/linux/fscache-cache.h
+++ b/include/linux/fscache-cache.h
@@ -21,6 +21,7 @@
21#include <linux/fscache.h> 21#include <linux/fscache.h>
22#include <linux/sched.h> 22#include <linux/sched.h>
23#include <linux/slow-work.h> 23#include <linux/slow-work.h>
24#include <linux/workqueue.h>
24 25
25#define NR_MAXCACHES BITS_PER_LONG 26#define NR_MAXCACHES BITS_PER_LONG
26 27
@@ -389,7 +390,7 @@ struct fscache_object {
389 struct fscache_cache *cache; /* cache that supplied this object */ 390 struct fscache_cache *cache; /* cache that supplied this object */
390 struct fscache_cookie *cookie; /* netfs's file/index object */ 391 struct fscache_cookie *cookie; /* netfs's file/index object */
391 struct fscache_object *parent; /* parent object */ 392 struct fscache_object *parent; /* parent object */
392 struct slow_work work; /* attention scheduling record */ 393 struct work_struct work; /* attention scheduling record */
393 struct list_head dependents; /* FIFO of dependent objects */ 394 struct list_head dependents; /* FIFO of dependent objects */
394 struct list_head dep_link; /* link in parent's dependents list */ 395 struct list_head dep_link; /* link in parent's dependents list */
395 struct list_head pending_ops; /* unstarted operations on this object */ 396 struct list_head pending_ops; /* unstarted operations on this object */
@@ -411,7 +412,7 @@ extern const char *fscache_object_states[];
411 (test_bit(FSCACHE_IOERROR, &(obj)->cache->flags) && \ 412 (test_bit(FSCACHE_IOERROR, &(obj)->cache->flags) && \
412 (obj)->state >= FSCACHE_OBJECT_DYING) 413 (obj)->state >= FSCACHE_OBJECT_DYING)
413 414
414extern const struct slow_work_ops fscache_object_slow_work_ops; 415extern void fscache_object_work_func(struct work_struct *work);
415 416
416/** 417/**
417 * fscache_object_init - Initialise a cache object description 418 * fscache_object_init - Initialise a cache object description
@@ -433,7 +434,7 @@ void fscache_object_init(struct fscache_object *object,
433 spin_lock_init(&object->lock); 434 spin_lock_init(&object->lock);
434 INIT_LIST_HEAD(&object->cache_link); 435 INIT_LIST_HEAD(&object->cache_link);
435 INIT_HLIST_NODE(&object->cookie_link); 436 INIT_HLIST_NODE(&object->cookie_link);
436 vslow_work_init(&object->work, &fscache_object_slow_work_ops); 437 INIT_WORK(&object->work, fscache_object_work_func);
437 INIT_LIST_HEAD(&object->dependents); 438 INIT_LIST_HEAD(&object->dependents);
438 INIT_LIST_HEAD(&object->dep_link); 439 INIT_LIST_HEAD(&object->dep_link);
439 INIT_LIST_HEAD(&object->pending_ops); 440 INIT_LIST_HEAD(&object->pending_ops);
@@ -534,6 +535,8 @@ extern void fscache_io_error(struct fscache_cache *cache);
534extern void fscache_mark_pages_cached(struct fscache_retrieval *op, 535extern void fscache_mark_pages_cached(struct fscache_retrieval *op,
535 struct pagevec *pagevec); 536 struct pagevec *pagevec);
536 537
538extern bool fscache_object_sleep_till_congested(signed long *timeoutp);
539
537extern enum fscache_checkaux fscache_check_aux(struct fscache_object *object, 540extern enum fscache_checkaux fscache_check_aux(struct fscache_object *object,
538 const void *data, 541 const void *data,
539 uint16_t datalen); 542 uint16_t datalen);