diff options
author | David Howells <dhowells@redhat.com> | 2009-11-19 13:11:45 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2009-11-19 13:11:45 -0500 |
commit | 60d543ca724be155c2b6166e36a00c80b21bd810 (patch) | |
tree | 90ec6edd77ddb7666dbf7069aa2e001f155cea49 /include/linux/fscache-cache.h | |
parent | d461d26dde901b0523c46b0317e7fccf574a3933 (diff) |
FS-Cache: Start processing an object's operations on that object's death
Start processing an object's operations when that object moves into the DYING
state as the object cannot be destroyed until all its outstanding operations
have completed.
Furthermore, make sure that read and allocation operations handle being woken
up on a dead object. Such events are recorded in the Allocs.abt and
Retrvls.abt statistics as viewable through /proc/fs/fscache/stats.
The code for waiting for object activation for the read and allocation
operations is also extracted into its own function as it is much the same in
all cases, differing only in the stats incremented.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'include/linux/fscache-cache.h')
-rw-r--r-- | include/linux/fscache-cache.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h index 4750d5fb419f..907bb56c5888 100644 --- a/include/linux/fscache-cache.h +++ b/include/linux/fscache-cache.h | |||
@@ -404,6 +404,10 @@ extern const char *fscache_object_states[]; | |||
404 | (obj)->state >= FSCACHE_OBJECT_AVAILABLE && \ | 404 | (obj)->state >= FSCACHE_OBJECT_AVAILABLE && \ |
405 | (obj)->state < FSCACHE_OBJECT_DYING) | 405 | (obj)->state < FSCACHE_OBJECT_DYING) |
406 | 406 | ||
407 | #define fscache_object_is_dead(obj) \ | ||
408 | (test_bit(FSCACHE_IOERROR, &(obj)->cache->flags) && \ | ||
409 | (obj)->state >= FSCACHE_OBJECT_DYING) | ||
410 | |||
407 | extern const struct slow_work_ops fscache_object_slow_work_ops; | 411 | extern const struct slow_work_ops fscache_object_slow_work_ops; |
408 | 412 | ||
409 | /** | 413 | /** |