OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_0-44-g735fa5f
Gerrit Code Review
gerrit@openafs.org
Fri, 6 Nov 2020 10:10:38 -0500
The following commit has been merged in the master branch:
commit 735fa5fb090ee0efc2161597a3974f6fa45126f6
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Thu Jan 30 14:04:05 2020 -0500
dir: distinguish logical and physical errors on reads
The directory package (src/dir) salvage routines DirOK and DirSalvage
check a global variable 'DErrno' to distinguish logical errors (e.g.
short read) from physical errors (e.g. EIO). However, since the
original IBM import, this logic has not worked correctly because there
is no longer any code that sets the value of DErrno - its value is
always zero.
Instead, modify all implementations of ReallyRead to optionally return
the errno for low-level IO errors.
Also, create a new userspace-only variant - DReadWithErrno() - of the
src/dir/buffer.c version of DRead (the version called by DirOK and
DirSalvage, and the only caller of ReallyRead) to return the ReallyRead
errno upon request.
Also create an analogous variant of afs_dir_GetBlobs,
afs_dir_GetBlobsWithErrno().
Finally, convert DirOK and DirSalvage to use the new variants and
replace DErrno with equivalent logic. Remove all other references to
DErrno.
Change-Id: I3de182ce49c1682572142da594af5dc2c00ede74
Reviewed-on: https://gerrit.openafs.org/13798
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/WINNT/afsd/cm_dir.c | 2 -
src/afs/afs_buffer.c | 29 ++++++++++++++++++++++-
src/dir/buffer.c | 44 ++++++++++++++++++++++++++++-------
src/dir/dir.c | 29 ++++++++++++++++++-----
src/dir/dir.h | 3 ++
src/dir/salvage.c | 57 ++++++++++++++++++++++------------------------
src/dir/test/dtest.c | 46 ++++++++++++++++++++++++++++++-------
src/viced/physio.c | 42 +++++++++++++++++++++++++---------
src/vol/physio.c | 39 ++++++++++++++++++++++++-------
src/volser/physio.c | 38 ++++++++++++++++++++++++-------
10 files changed, 241 insertions(+), 88 deletions(-)
--
OpenAFS Master Repository