OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_2-183-g4bee2ad
Gerrit Code Review
gerrit@openafs.org
Thu, 13 Mar 2025 11:22:26 -0400
The following commit has been merged in the master branch:
commit 4bee2adcee4034a2a886330527d5394a0d7737f6
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Feb 10 13:18:32 2025 -0600
afs: Introduce afs_InstallCaps()
Currently, we have two places that call RXAFS_GetCapabilities() and
interpret the results: CkSrv_GetCaps() and afs_GetCapabilities(). These
two code paths handle some edge cases in odd ways, sometimes
differently:
- CkSrv_GetCaps() always sets SCAPS_KNOWN and resets ts->capabilities,
even if the call fails. afs_GetCapabilities() does neither for many
errors.
- Both will set ts->capabilities if we received at least 32-bits of
capabilities, even if the call aborts (unless it aborted with
RXGEN_OPCODE specifically).
To improve this area of code, introduce the function afs_InstallCaps(),
which interprets the results of an RXAFS_GetCapabilities(). This reduces
duplication of the capabilities-interpreting logic, ensures both code
paths treat the results identically, and helps slightly simplify the
calling functions.
This new function changes both cases to only set SCAPS_KNOWN if the call
completes successfully, or aborts with RXGEN_OPCODE. The capabilities
bits are now only interpreted if the call completes successfully, like
we do for almost all other RPC calls.
Change-Id: Ic8ea222314b6b138d135b98078241e5c59a61429
Reviewed-on: https://gerrit.openafs.org/16246
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
src/afs/afs_server.c | 54 ++++++++++++++++++++++++++++++++--------------------
1 file changed, 33 insertions(+), 21 deletions(-)
--
OpenAFS Master Repository