ext4: count hits/misses of extent cache and expose in sysfs

The number of hits and misses for each filesystem is exposed in
/sys/fs/ext4/<dev>/extent_cache_{hits, misses}.

Tested: fsstress, manual checks.
Signed-off-by: Vivek Haldar <haldar@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
Vivek Haldar
2011-05-22 21:24:16 -04:00
committed by Theodore Ts'o
parent 93917411be
commit 77f4135f2a
3 changed files with 25 additions and 1 deletions

View File

@@ -1144,6 +1144,9 @@ struct ext4_sb_info {
unsigned long s_ext_blocks;
unsigned long s_ext_extents;
#endif
/* ext4 extent cache stats */
unsigned long extent_cache_hits;
unsigned long extent_cache_misses;
/* for buddy allocator */
struct ext4_group_info ***s_group_info;