OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-4662-ga19728b
Gerrit Code Review
gerrit@openafs.org
Fri, 21 Aug 2015 18:53:30 -0400
The following commit has been merged in the master branch:
commit a19728ba55f30a41799855b49c5cf6c07c840f87
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Feb 13 18:02:44 2015 -0600
afs: Clarify vcache->mvid accesses
Currently, numerous places in the code treat the 'mvid' field in
struct vcache as a few different things:
- If the vcache is a mountpoint, mvid points to the fid of the root
dir of the target volume.
- If the vcache is a volume root dir, mvid points to the fid of the
parent dir for the mountpoint.
- If the vcache is a sillyrenamed file, mvid points to a string,
which is the name the vcache was renamed to.
Despite these three things being very different (and one of them is a
completely different type than the others), everywhere in the code
just accesses mvid as 'avc->mvid'. This can make it very confusing as
to what the field actually means at any particular part of the code,
and makes it very difficult to search the code for places that use
mvid in any one of these specific ways.
So, to aid in code clarity, make mvid into a union, with the following
members:
- target_root: For the "mountpoint" case.
- parent: For the "root dir" case.
- silly_name: For the "sillyrename" case.
This should have no effect on code behavior, but just makes the code a
bit clearer.
Change-Id: I45391bb7a99d6f8e35c44873b677d157ea681900
Reviewed-on: http://gerrit.openafs.org/11748
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/afs/DARWIN/osi_vnodeops.c | 2 +-
src/afs/IRIX/osi_idbg.c | 4 +-
src/afs/LINUX/osi_export.c | 4 +-
src/afs/LINUX/osi_vnodeops.c | 6 ++--
src/afs/VNOPS/afs_vnop_dirops.c | 2 +-
src/afs/VNOPS/afs_vnop_lookup.c | 54 +++++++++++++++++++-------------------
src/afs/VNOPS/afs_vnop_readdir.c | 14 +++++-----
src/afs/VNOPS/afs_vnop_remove.c | 14 +++++-----
src/afs/afs.h | 10 ++++++-
src/afs/afs_callback.c | 4 +-
src/afs/afs_vcache.c | 44 +++++++++++++++---------------
src/afs/afs_volume.c | 12 ++++----
12 files changed, 89 insertions(+), 81 deletions(-)
--
OpenAFS Master Repository