aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fscache/internal.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2009-11-19 13:11:19 -0500
committerDavid Howells <dhowells@redhat.com>2009-11-19 13:11:19 -0500
commit5753c441889253e4323eee85f791a1d64cf08196 (patch)
tree55a0de053d0593d96e99710f978277df668412d1 /fs/fscache/internal.h
parentb34df792b4e9e311db47fad27949095d0629c197 (diff)
FS-Cache: Permit cache retrieval ops to be interrupted in the initial wait phase
Permit the operations to retrieve data from the cache or to allocate space in the cache for future writes to be interrupted whilst they're waiting for permission for the operation to proceed. Typically this wait occurs whilst the cache object is being looked up on disk in the background. If an interruption occurs, and the operation has not yet been given the go-ahead to run, the operation is dequeued and cancelled, and control returns to the read operation of the netfs routine with none of the requested pages having been read or in any way marked as known by the cache. This means that the initial wait is done interruptibly rather than uninterruptibly. In addition, extra stats values are made available to show the number of ops cancelled and the number of cache space allocations interrupted. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/fscache/internal.h')
-rw-r--r--fs/fscache/internal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/fscache/internal.h b/fs/fscache/internal.h
index b85cc8906818..50324ad2b194 100644
--- a/fs/fscache/internal.h
+++ b/fs/fscache/internal.h
@@ -112,6 +112,7 @@ extern int fscache_submit_exclusive_op(struct fscache_object *,
112 struct fscache_operation *); 112 struct fscache_operation *);
113extern int fscache_submit_op(struct fscache_object *, 113extern int fscache_submit_op(struct fscache_object *,
114 struct fscache_operation *); 114 struct fscache_operation *);
115extern int fscache_cancel_op(struct fscache_operation *);
115extern void fscache_abort_object(struct fscache_object *); 116extern void fscache_abort_object(struct fscache_object *);
116extern void fscache_start_operations(struct fscache_object *); 117extern void fscache_start_operations(struct fscache_object *);
117extern void fscache_operation_gc(struct work_struct *); 118extern void fscache_operation_gc(struct work_struct *);
@@ -140,6 +141,7 @@ extern atomic_t fscache_n_op_enqueue;
140extern atomic_t fscache_n_op_deferred_release; 141extern atomic_t fscache_n_op_deferred_release;
141extern atomic_t fscache_n_op_release; 142extern atomic_t fscache_n_op_release;
142extern atomic_t fscache_n_op_gc; 143extern atomic_t fscache_n_op_gc;
144extern atomic_t fscache_n_op_cancelled;
143 145
144extern atomic_t fscache_n_attr_changed; 146extern atomic_t fscache_n_attr_changed;
145extern atomic_t fscache_n_attr_changed_ok; 147extern atomic_t fscache_n_attr_changed_ok;
@@ -151,6 +153,7 @@ extern atomic_t fscache_n_allocs;
151extern atomic_t fscache_n_allocs_ok; 153extern atomic_t fscache_n_allocs_ok;
152extern atomic_t fscache_n_allocs_wait; 154extern atomic_t fscache_n_allocs_wait;
153extern atomic_t fscache_n_allocs_nobufs; 155extern atomic_t fscache_n_allocs_nobufs;
156extern atomic_t fscache_n_allocs_intr;
154extern atomic_t fscache_n_alloc_ops; 157extern atomic_t fscache_n_alloc_ops;
155extern atomic_t fscache_n_alloc_op_waits; 158extern atomic_t fscache_n_alloc_op_waits;
156 159