OpenAFS Master Repository branch, master, updated. BP-openafs-stable-1_8_x-539-g091e8e9
Gerrit Code Review
Thu, 12 Mar 2020 23:51:33 -0400
The following commit has been merged in the master branch:
Author: Andrew Deason <email@example.com>
Date: Fri Aug 23 12:21:54 2019 -0500
ubik: Introduce ubik_CallRock
In OpenAFS 1.0, the way we made dbserver RPC calls was to pass the
relevant RPC and arguments to ubik_Call()/ubik_Call_New(), which
coerced all of the RPC arguments into 'long's. To make this more
typesafe, in commit 4478d3a9 (ubik-call-sucks-20060703) most callers
were converted to use ubik_RPC_name()-style calls, which used
functions autogenerated by rxgen.
This latter approach, however, only lets us use the ubik_Call-style
site selection code with RPCs processed by rxgen; we can't insert
additional code to run before or after the relevant RPC.
To make our dbserver calls more flexible, but avoid coercing all of
our arguments into 'long's again, move back to the ubik_Call()-style
approach, but use actual typed arguments with a callback function and
a rock. Call it ubik_CallRock().
With this commit rxgen still generates the ubik_RPC_name()-style
stubs, but the stubs just call ubik_CallRock with a generated callback
function, instead of spitting out the equivalent of ubik_Call() in the
generated code itself.
To try to ensure that this commit doesn't incur any unintended extra
changes, make ubik_CallRock consist of the generated code that was
inside rxgen before this commit. This is almost identical to
ubik_Call, but not quite; consolidating these two functions can happen
in a future commit if desired.
Tested-by: BuildBot <firstname.lastname@example.org>
Reviewed-by: Benjamin Kaduk <email@example.com>
src/libafsauthent/afsauthent.def | 1 +
src/libafsauthent/libafsauthent.la.sym | 1 +
src/rxgen/rpc_parse.c | 201 +++++++++++++++----------------
src/ubik/ubik.p.h | 9 ++
src/ubik/ubikclient.c | 120 +++++++++++++++++++
5 files changed, 228 insertions(+), 104 deletions(-)
OpenAFS Master Repository