OpenAFS Master Repository branch, openafs-stable-1_8_x, updated. openafs-stable-1_8_3-19-g7328cb0b
Gerrit Code Review
gerrit@openafs.org
Mon, 10 Jun 2019 07:50:31 -0400
The following commit has been merged in the openafs-stable-1_8_x branch:
commit 7328cb0b000c61672ab75cda14ba0e42839adb03
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Aug 9 20:06:00 2017 -0500
SOLARIS: Accept vnodes in vnode ops
Currently, our vnode op callbacks look like this:
int gafs_fsync(struct vcache *avc, afs_ucred_t *acred);
And a pointer to gafs_fsync is given directly to Solaris. This cannot
be correct, since 'struct vcache' is an OpenAFS type, so Solaris
cannot possibly give us a 'struct vcache'. The actual correct
signature for such a function is something like this:
int gafs_fsync(struct vnode *vp, afs_ucred_t *acred);
And then the 'gafs_fsync' function is supposed to translate 'vp' into
a vcache.
This works on Solaris right now because we embed the vnode as the
first member in our vcache, and so a pointer to a vnode is also a
pointer to a vcache. However, this would break if we ever change
Solaris vcaches to use a non-embedded vnode (like on some other
platforms). And even now, this causes a lot of warnings in
osi_vnodeops.c, since the function signatures are wrong for our vnode
callbacks.
So to fix this, change all of these functions to accept a 'struct
vnode', and translate to/from vnodes and vcaches appropriately.
Reviewed-on: https://gerrit.openafs.org/12694
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
(cherry picked from commit 9a2b11747ce355d9adc8a5a646c88f8f3d9765ee)
Change-Id: I85cee787e26886596a10c6b9a02f33f2bf28d65d
Reviewed-on: https://gerrit.openafs.org/13526
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/SOLARIS/osi_vnodeops.c | 118 +++++++++++++++++++++++-----------------
1 files changed, 67 insertions(+), 51 deletions(-)
--
OpenAFS Master Repository