diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-09-07 14:01:38 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-09-29 18:38:06 +0200 |
commit | 4f29d810cad03047c19e5de3c342c90df7193c8b (patch) | |
tree | 5ff3cda23e93964eb5c7790fd5cda605cd8317a0 /libdiskfs | |
parent | b2ae574d39adfe283c61a3ec0c766e8780f345af (diff) |
libdiskfs: remove code counting cache misses
* libdiskfs/lookup.c (cache_misses): Remove.
(cm_lock): Likewise.
(diskfs_lookup): Do not count cache misses.
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/lookup.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/libdiskfs/lookup.c b/libdiskfs/lookup.c index bc2ad01e..486fedce 100644 --- a/libdiskfs/lookup.c +++ b/libdiskfs/lookup.c @@ -21,17 +21,6 @@ #include "priv.h" #include <string.h> -static struct -{ - int present; - int absent; - int errors; - int dot; - int dotdot; -} cache_misses; -static pthread_spinlock_t cm_lock = PTHREAD_SPINLOCK_INITIALIZER; - - /* Lookup in directory DP (which is locked) the name NAME. TYPE will either be LOOKUP, CREATE, RENAME, or REMOVE. CRED identifies the user making the call. @@ -175,26 +164,6 @@ diskfs_lookup (struct node *dp, const char *name, enum lookup_type type, else { err = diskfs_lookup_hard (dp, name, type, np, ds, cred); - - pthread_spin_lock (&cm_lock); - if (type == LOOKUP) - { - if (err == ENOENT) - cache_misses.absent++; - else if (err) - cache_misses.errors++; - else - cache_misses.present++; - if (name[0] == '.') - { - if (name[1] == '\0') - cache_misses.dot++; - else if (name[1] == '.' && name[2] == '\0') - cache_misses.dotdot++; - } - } - pthread_spin_unlock (&cm_lock); - if (err && err != ENOENT) return err; |