[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 73/87: libdiskfs: remove code counting cache misses
From: |
Samuel Thibault |
Subject: |
[hurd] 73/87: libdiskfs: remove code counting cache misses |
Date: |
Sun, 09 Nov 2014 11:05:05 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 4f29d810cad03047c19e5de3c342c90df7193c8b
Author: Justus Winter <address@hidden>
Date: Sun Sep 7 14:01:38 2014 +0200
libdiskfs: remove code counting cache misses
* libdiskfs/lookup.c (cache_misses): Remove.
(cm_lock): Likewise.
(diskfs_lookup): Do not count cache misses.
---
libdiskfs/lookup.c | 31 -------------------------------
1 file changed, 31 deletions(-)
diff --git a/libdiskfs/lookup.c b/libdiskfs/lookup.c
index bc2ad01..486fedc 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;
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 52/87: libdiskfs: fix reference counting of peropen objects, (continued)
- [hurd] 52/87: libdiskfs: fix reference counting of peropen objects, Samuel Thibault, 2014/11/09
- [hurd] 62/87: hurd: add symbolic name for the mtab translator, Samuel Thibault, 2014/11/09
- [hurd] 70/87: procfs: generalize the translator linkage code, Samuel Thibault, 2014/11/09
- [hurd] 56/87: hurd: fix semantic of file_get_children, Samuel Thibault, 2014/11/09
- [hurd] 47/87: Make the ncursesw driver of the console client compile properly, Samuel Thibault, 2014/11/09
- [hurd] 65/87: exec: add proper argument parsing, add --device-master-port, Samuel Thibault, 2014/11/09
- [hurd] 18/87: hurd: fix type of optimal_transfer_size, Samuel Thibault, 2014/11/09
- [hurd] 50/87: sutils: add urandom device target to MAKEDEV, Samuel Thibault, 2014/11/09
- [hurd] 45/87: Revert "libpipe: fix calls to pipe_send with no data", Samuel Thibault, 2014/11/09
- [hurd] 57/87: include: detect use-after-free errors using the reference counts, Samuel Thibault, 2014/11/09
- [hurd] 73/87: libdiskfs: remove code counting cache misses,
Samuel Thibault <=
- [hurd] 82/87: Fix dead name notification in static binaries, Samuel Thibault, 2014/11/09
- [hurd] 68/87: procfs: implement /proc/filesystems, Samuel Thibault, 2014/11/09
- [hurd] 71/87: procfs: reorganize rootdir.c, Samuel Thibault, 2014/11/09
- [hurd] 78/87: Fix proc_getprocinfo calls, Samuel Thibault, 2014/11/09
- [hurd] 80/87: Fix actual procinfo_t type, Samuel Thibault, 2014/11/09
- [hurd] 83/87: Use a mere weak attribute instead of a weak alias, Samuel Thibault, 2014/11/09
- [hurd] 17/87: include: use unsigned literal in combination with binary not, Samuel Thibault, 2014/11/09
- [hurd] 79/87: Fix proc_getprocinfo calls, Samuel Thibault, 2014/11/09
- [hurd] 20/87: libdiskfs: avoid implicit integer conversion, Samuel Thibault, 2014/11/09
- [hurd] 67/87: procfs: implement /proc/N/maps, Samuel Thibault, 2014/11/09