OpenAFS Master Repository branch, openafs-stable-1_8_x, updated. openafs-stable-1_8_10-32-ga367bed
Gerrit Code Review
gerrit@openafs.org
Thu, 5 Oct 2023 08:45:46 -0400
The following commit has been merged in the openafs-stable-1_8_x branch:
commit a367bed24fdc519b78e252e7a48f8d0666b1c7dd
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.
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>
(cherry picked from commit 735fa5fb090ee0efc2161597a3974f6fa45126f6)
Change-Id: Ic7b87d1de71feb7ae741b43d534a3d94cd277125
Reviewed-on: https://gerrit.openafs.org/15545
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
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