OpenAFS Master Repository branch, openafs-stable-1_8_x, updated. openafs-stable-1_8_0-14-ga5eeee6
Gerrit Code Review
gerrit@openafs.org
Sat, 2 Jun 2018 18:18:35 -0400
The following commit has been merged in the openafs-stable-1_8_x branch:
commit a5eeee6d2ef87d95722950989a2d261efc72b959
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Apr 30 17:30:56 2018 -0500
LINUX: Return NULL for afs_linux_raw_open error
Currently, afs_linux_raw_open (and by extension, LINUX's
implementation of osi_UFSOpen) panic when they are unable to open the
given cache file. To allow callers to handle the error more
gracefully, change afs_linux_raw_open and osi_UFSOpen to return NULL
on error, instead of panic'ing. Expand the language a little on the
message logged while we're here, since the system might keep running
after this situation now.
This commit also changes all callers that did not already handle
afs_linux_raw_open/osi_UFSOpen errors to assert on errors, so we still
panic for all situations where we encounter an error. More graceful
behavior will be added in future commits; this commit does not change
the behavior on its own.
An error on opening cache files can legitimately happen when there is
corruption in the filesystem backing the disk cache, but possibly the
easiest way to generate an error is if the filesystem has been
forcibly mounted readonly (which can happen at runtime due to
filesystem corruption or various hardware faults). The latter will
generate -EROFS (-30) errors, but of course other errors are probably
possible.
Reviewed-on: https://gerrit.openafs.org/13045
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit f6af4a155d3636e8f812e40c7169dd8902ae64be)
Change-Id: I5f9a71a96cd9c875f4b024562dfa714f9cc27e2f
Reviewed-on: https://gerrit.openafs.org/13071
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/afs/LINUX/osi_file.c | 18 +++++++++++++++---
src/afs/LINUX/osi_vnodeops.c | 2 ++
src/afs/VNOPS/afs_vnop_symlink.c | 1 +
src/afs/VNOPS/afs_vnop_write.c | 1 +
src/afs/afs_buffer.c | 3 +++
src/afs/afs_dcache.c | 6 ++++++
src/afs/afs_disconnected.c | 1 +
src/afs/afs_fetchstore.c | 1 +
src/afs/afs_init.c | 1 +
src/afs/afs_segments.c | 2 ++
10 files changed, 33 insertions(+), 3 deletions(-)
--
OpenAFS Master Repository