aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fscache/internal.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2009-11-19 13:11:08 -0500
committerDavid Howells <dhowells@redhat.com>2009-11-19 13:11:08 -0500
commit52bd75fdb135d6133d878ae60c6e7e3f4ebc1cfc (patch)
tree4fad4fa37ce533c520a4575e5b7df90e19c6a666 /fs/fscache/internal.h
parent4fbf4291aa15926cd4fdca0ffe9122e89d0459db (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.h22
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;
208extern atomic_t fscache_n_checkaux_update; 208extern atomic_t fscache_n_checkaux_update;
209extern atomic_t fscache_n_checkaux_obsolete; 209extern atomic_t fscache_n_checkaux_obsolete;
210 210
211extern atomic_t fscache_n_cop_alloc_object;
212extern atomic_t fscache_n_cop_lookup_object;
213extern atomic_t fscache_n_cop_lookup_complete;
214extern atomic_t fscache_n_cop_grab_object;
215extern atomic_t fscache_n_cop_update_object;
216extern atomic_t fscache_n_cop_drop_object;
217extern atomic_t fscache_n_cop_put_object;
218extern atomic_t fscache_n_cop_sync_cache;
219extern atomic_t fscache_n_cop_attr_changed;
220extern atomic_t fscache_n_cop_read_or_alloc_page;
221extern atomic_t fscache_n_cop_read_or_alloc_pages;
222extern atomic_t fscache_n_cop_allocate_page;
223extern atomic_t fscache_n_cop_allocate_pages;
224extern atomic_t fscache_n_cop_write_page;
225extern atomic_t fscache_n_cop_uncache_page;
226extern atomic_t fscache_n_cop_dissociate_pages;
227
211static inline void fscache_stat(atomic_t *stat) 228static inline void fscache_stat(atomic_t *stat)
212{ 229{
213 atomic_inc(stat); 230 atomic_inc(stat);
214} 231}
215 232
233static inline void fscache_stat_d(atomic_t *stat)
234{
235 atomic_dec(stat);
236}
237
216extern const struct file_operations fscache_stats_fops; 238extern const struct file_operations fscache_stats_fops;
217#else 239#else
218 240