diff options
author | David Howells <dhowells@redhat.com> | 2009-11-19 13:11:04 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2009-11-19 13:11:04 -0500 |
commit | 4fbf4291aa15926cd4fdca0ffe9122e89d0459db (patch) | |
tree | ec2195c39ef8117acea598af4a5c20c77f67aa0b /fs/fscache/internal.h | |
parent | 440f0affe247e9990c8f8778f1861da4fd7d5e50 (diff) |
FS-Cache: Allow the current state of all objects to be dumped
Allow the current state of all fscache objects to be dumped by doing:
cat /proc/fs/fscache/objects
By default, all objects and all fields will be shown. This can be restricted
by adding a suitable key to one of the caller's keyrings (such as the session
keyring):
keyctl add user fscache:objlist "<restrictions>" @s
The <restrictions> are:
K Show hexdump of object key (don't show if not given)
A Show hexdump of object aux data (don't show if not given)
And paired restrictions:
C Show objects that have a cookie
c Show objects that don't have a cookie
B Show objects that are busy
b Show objects that aren't busy
W Show objects that have pending writes
w Show objects that don't have pending writes
R Show objects that have outstanding reads
r Show objects that don't have outstanding reads
S Show objects that have slow work queued
s Show objects that don't have slow work queued
If neither side of a restriction pair is given, then both are implied. For
example:
keyctl add user fscache:objlist KB @s
shows objects that are busy, and lists their object keys, but does not dump
their auxiliary data. It also implies "CcWwRrSs", but as 'B' is given, 'b' is
not implied.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/fscache/internal.h')
-rw-r--r-- | fs/fscache/internal.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/fscache/internal.h b/fs/fscache/internal.h index 1c341304621f..fe02973a9516 100644 --- a/fs/fscache/internal.h +++ b/fs/fscache/internal.h | |||
@@ -88,11 +88,24 @@ extern int fscache_wait_bit_interruptible(void *); | |||
88 | /* | 88 | /* |
89 | * object.c | 89 | * object.c |
90 | */ | 90 | */ |
91 | extern const char fscache_object_states_short[FSCACHE_OBJECT__NSTATES][5]; | ||
92 | |||
91 | extern void fscache_withdrawing_object(struct fscache_cache *, | 93 | extern void fscache_withdrawing_object(struct fscache_cache *, |
92 | struct fscache_object *); | 94 | struct fscache_object *); |
93 | extern void fscache_enqueue_object(struct fscache_object *); | 95 | extern void fscache_enqueue_object(struct fscache_object *); |
94 | 96 | ||
95 | /* | 97 | /* |
98 | * object-list.c | ||
99 | */ | ||
100 | #ifdef CONFIG_FSCACHE_OBJECT_LIST | ||
101 | extern const struct file_operations fscache_objlist_fops; | ||
102 | |||
103 | extern void fscache_objlist_add(struct fscache_object *); | ||
104 | #else | ||
105 | #define fscache_objlist_add(object) do {} while(0) | ||
106 | #endif | ||
107 | |||
108 | /* | ||
96 | * operation.c | 109 | * operation.c |
97 | */ | 110 | */ |
98 | extern int fscache_submit_exclusive_op(struct fscache_object *, | 111 | extern int fscache_submit_exclusive_op(struct fscache_object *, |