From a63a07c3357cc6f54ef129e0542ec531f2ce9433 Mon Sep 17 00:00:00 2001 From: Ben Kaduk Date: Tue, 26 Mar 2013 19:43:07 -0400 Subject: [PATCH] Garbage-collect afs_GCUserData's argument We no longer need the ability to force all rxnull connections to be reaped, as the epoch is set globally. Change the prototype and callers accordingly. Change-Id: I0815fdd035c3dd9d56f72e43603f9c53f5cec79d Reviewed-on: http://gerrit.openafs.org/10842 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- src/afs/afs_daemons.c | 2 +- src/afs/afs_pag_call.c | 2 +- src/afs/afs_prototypes.h | 2 +- src/afs/afs_user.c | 10 +++------- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/afs/afs_daemons.c b/src/afs/afs_daemons.c index fb7917028..538dd59d1 100644 --- a/src/afs/afs_daemons.c +++ b/src/afs/afs_daemons.c @@ -247,7 +247,7 @@ afs_Daemon(void) #endif /* else AFS_USERSPACE_IP_ADDR */ if (!afs_CheckServerDaemonStarted) afs_CheckServers(0, NULL); - afs_GCUserData(0); /* gc old conns */ + afs_GCUserData(); /* gc old conns */ /* This is probably the wrong way of doing GC for the various exporters but it will suffice for a while */ for (exporter = root_exported; exporter; exporter = exporter->exp_next) { diff --git a/src/afs/afs_pag_call.c b/src/afs/afs_pag_call.c index 609442864..ddc53b875 100644 --- a/src/afs/afs_pag_call.c +++ b/src/afs/afs_pag_call.c @@ -61,7 +61,7 @@ afs_Daemon(void) now = osi_Time(); if (last10MinCheck + 600 < now) { - afs_GCUserData(0); + afs_GCUserData(); } if (last60MinCheck + 3600 < now) { diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h index 6e5187944..4495a914f 100644 --- a/src/afs/afs_prototypes.h +++ b/src/afs/afs_prototypes.h @@ -1002,7 +1002,7 @@ extern void afs_GCPAGs_perproc_func(afs_proc_t * pproc); #endif /* AFS_GCPAGS */ extern void afs_ComputePAGStats(void); extern void afs_PutUser(struct unixuser *au, afs_int32 locktype); -extern void afs_GCUserData(int aforce); +extern void afs_GCUserData(void); extern void afs_CheckTokenCache(void); extern void afs_ResetAccessCache(afs_int32 uid, afs_int32 cell, int alock); extern void afs_ResetUserConns(struct unixuser *auser); diff --git a/src/afs/afs_user.c b/src/afs/afs_user.c index 8c61861ad..e4a51962a 100644 --- a/src/afs/afs_user.c +++ b/src/afs/afs_user.c @@ -55,14 +55,10 @@ void afs_ResetAccessCache(afs_int32 uid, afs_int32 cell, int alock); /* Called from afs_Daemon to garbage collect unixusers no longer using system, - * and their conns. The aforce parameter tells the function to flush all - * *unauthenticated* conns, no matter what their expiration time; it exists - * because after we choose our final rx epoch, we want to stop using calls with - * other epochs as soon as possible (old file servers act bizarrely when they - * see epoch changes). + * and their conns. */ void -afs_GCUserData(int aforce) +afs_GCUserData(void) { struct unixuser *tu, **lu, *nu; int i; @@ -88,7 +84,7 @@ afs_GCUserData(int aforce) if (!afs_HasUsableTokens(tu->tokens, now)) delFlag = 1; } else { - if (aforce || (tu->tokenTime < now - NOTOKTIMEOUT)) + if (tu->tokenTime < now - NOTOKTIMEOUT) delFlag = 1; } } -- 2.39.5