diff options
author | David Howells <dhowells@redhat.com> | 2009-11-19 13:11:08 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2009-11-19 13:11:08 -0500 |
commit | 52bd75fdb135d6133d878ae60c6e7e3f4ebc1cfc (patch) | |
tree | 4fad4fa37ce533c520a4575e5b7df90e19c6a666 /fs/fscache/internal.h | |
parent | 4fbf4291aa15926cd4fdca0ffe9122e89d0459db (diff) |
FS-Cache: Add counters for entry/exit to/from cache operation functions
Count entries to and exits from cache operation table functions. Maintain
these as a single counter that's added to or removed from as appropriate.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/fscache/internal.h')
-rw-r--r-- | fs/fscache/internal.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/fs/fscache/internal.h b/fs/fscache/internal.h index fe02973a9516..b85cc8906818 100644 --- a/fs/fscache/internal.h +++ b/fs/fscache/internal.h | |||
@@ -208,11 +208,33 @@ extern atomic_t fscache_n_checkaux_okay; | |||
208 | extern atomic_t fscache_n_checkaux_update; | 208 | extern atomic_t fscache_n_checkaux_update; |
209 | extern atomic_t fscache_n_checkaux_obsolete; | 209 | extern atomic_t fscache_n_checkaux_obsolete; |
210 | 210 | ||
211 | extern atomic_t fscache_n_cop_alloc_object; | ||
212 | extern atomic_t fscache_n_cop_lookup_object; | ||
213 | extern atomic_t fscache_n_cop_lookup_complete; | ||
214 | extern atomic_t fscache_n_cop_grab_object; | ||
215 | extern atomic_t fscache_n_cop_update_object; | ||
216 | extern atomic_t fscache_n_cop_drop_object; | ||
217 | extern atomic_t fscache_n_cop_put_object; | ||
218 | extern atomic_t fscache_n_cop_sync_cache; | ||
219 | extern atomic_t fscache_n_cop_attr_changed; | ||
220 | extern atomic_t fscache_n_cop_read_or_alloc_page; | ||
221 | extern atomic_t fscache_n_cop_read_or_alloc_pages; | ||
222 | extern atomic_t fscache_n_cop_allocate_page; | ||
223 | extern atomic_t fscache_n_cop_allocate_pages; | ||
224 | extern atomic_t fscache_n_cop_write_page; | ||
225 | extern atomic_t fscache_n_cop_uncache_page; | ||
226 | extern atomic_t fscache_n_cop_dissociate_pages; | ||
227 | |||
211 | static inline void fscache_stat(atomic_t *stat) | 228 | static inline void fscache_stat(atomic_t *stat) |
212 | { | 229 | { |
213 | atomic_inc(stat); | 230 | atomic_inc(stat); |
214 | } | 231 | } |
215 | 232 | ||
233 | static inline void fscache_stat_d(atomic_t *stat) | ||
234 | { | ||
235 | atomic_dec(stat); | ||
236 | } | ||
237 | |||
216 | extern const struct file_operations fscache_stats_fops; | 238 | extern const struct file_operations fscache_stats_fops; |
217 | #else | 239 | #else |
218 | 240 | ||