afsd: Suppress misleading debug messages when -memcache

When running afsd with the -memcache option, afsd_run will skip certain
AFSOP_* syscalls that are not needed for a memory cache, e.g.
AFSOP_CACHEINFO and AFSOP_VOLUMINFO.  However, afsd -debug output still
misleadingly mentions these syscalls, as if they were about to be
invoked.

For AFSOP_CACHEINFO, this has been true since the original IBM code
import.  For AFS_VOLUMEINFO, this was introduced with commit
1307b89188 memcache-no-volitems-20050113.

In order to avoid misleading debug output when running -memcache, move
the afsd_debug() calls under their respective AFSCALL_INIT_MEMCACHE
conditional clauses.

Change-Id: Id13b5fc7c39ccc0836204ecf213f0fe68f666889
Reviewed-on: https://gerrit.openafs.org/15566
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
Mark Vitale 2023-09-05 15:00:05 -04:00 committed by Michael Meffie
parent 7b4c1e43b5
commit 8f4e5b7e6b

View File

@ -2740,12 +2740,12 @@ afsd_run(void)
* Pass the kernel the name of the workstation cache file holding the
* dcache entries.
*/
if (afsd_debug)
printf("%s: Calling AFSOP_CACHEINFO: dcache file is '%s'\n", rn,
fullpn_DCacheFile);
/* once again, meaningless for a memory-based cache. */
if (!(cacheFlags & AFSCALL_INIT_MEMCACHE))
if (!(cacheFlags & AFSCALL_INIT_MEMCACHE)) {
if (afsd_debug)
printf("%s: Calling AFSOP_CACHEINFO: dcache file is '%s'\n", rn,
fullpn_DCacheFile);
afsd_syscall(AFSOP_CACHEINFO, fullpn_DCacheFile);
}
/*
* Pass the kernel the name of the workstation cache file holding the
@ -2898,12 +2898,12 @@ afsd_run(void)
* Pass the kernel the name of the workstation cache file holding the
* volume information.
*/
if (afsd_debug)
printf("%s: Calling AFSOP_VOLUMEINFO: volume info file is '%s'\n", rn,
fullpn_VolInfoFile);
/* once again, meaningless for a memory-based cache. */
if (!(cacheFlags & AFSCALL_INIT_MEMCACHE))
if (!(cacheFlags & AFSCALL_INIT_MEMCACHE)) {
if (afsd_debug)
printf("%s: Calling AFSOP_VOLUMEINFO: volume info file is '%s'\n", rn,
fullpn_VolInfoFile);
afsd_syscall(AFSOP_VOLUMEINFO, fullpn_VolInfoFile);
}
/*
* Give the kernel the names of the AFS files cached on the workstation's