diff options
author | David Howells <dhowells@redhat.com> | 2009-11-19 13:11:01 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2009-11-19 13:11:01 -0500 |
commit | 440f0affe247e9990c8f8778f1861da4fd7d5e50 (patch) | |
tree | 0012732ac8af0245005403d9a3b0a2b1209edf32 /include | |
parent | 3bde31a4ac225cb5805be02eff6eaaf7e0766ccd (diff) |
FS-Cache: Annotate slow-work runqueue proc lines for FS-Cache work items
Annotate slow-work runqueue proc lines for FS-Cache work items. Objects
include the object ID and the state. Operations include the object ID, the
operation ID and the operation type and state.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fscache-cache.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h index 84d3532dd3ea..7a9847ccd192 100644 --- a/include/linux/fscache-cache.h +++ b/include/linux/fscache-cache.h | |||
@@ -102,6 +102,16 @@ struct fscache_operation { | |||
102 | 102 | ||
103 | /* operation releaser */ | 103 | /* operation releaser */ |
104 | fscache_operation_release_t release; | 104 | fscache_operation_release_t release; |
105 | |||
106 | #ifdef CONFIG_SLOW_WORK_PROC | ||
107 | const char *name; /* operation name */ | ||
108 | const char *state; /* operation state */ | ||
109 | #define fscache_set_op_name(OP, N) do { (OP)->name = (N); } while(0) | ||
110 | #define fscache_set_op_state(OP, S) do { (OP)->state = (S); } while(0) | ||
111 | #else | ||
112 | #define fscache_set_op_name(OP, N) do { } while(0) | ||
113 | #define fscache_set_op_state(OP, S) do { } while(0) | ||
114 | #endif | ||
105 | }; | 115 | }; |
106 | 116 | ||
107 | extern atomic_t fscache_op_debug_id; | 117 | extern atomic_t fscache_op_debug_id; |
@@ -125,6 +135,7 @@ static inline void fscache_operation_init(struct fscache_operation *op, | |||
125 | op->debug_id = atomic_inc_return(&fscache_op_debug_id); | 135 | op->debug_id = atomic_inc_return(&fscache_op_debug_id); |
126 | op->release = release; | 136 | op->release = release; |
127 | INIT_LIST_HEAD(&op->pend_link); | 137 | INIT_LIST_HEAD(&op->pend_link); |
138 | fscache_set_op_state(op, "Init"); | ||
128 | } | 139 | } |
129 | 140 | ||
130 | /** | 141 | /** |
@@ -337,6 +348,7 @@ struct fscache_object { | |||
337 | FSCACHE_OBJECT_RECYCLING, /* retiring object */ | 348 | FSCACHE_OBJECT_RECYCLING, /* retiring object */ |
338 | FSCACHE_OBJECT_WITHDRAWING, /* withdrawing object */ | 349 | FSCACHE_OBJECT_WITHDRAWING, /* withdrawing object */ |
339 | FSCACHE_OBJECT_DEAD, /* object is now dead */ | 350 | FSCACHE_OBJECT_DEAD, /* object is now dead */ |
351 | FSCACHE_OBJECT__NSTATES | ||
340 | } state; | 352 | } state; |
341 | 353 | ||
342 | int debug_id; /* debugging ID */ | 354 | int debug_id; /* debugging ID */ |