OpenAFS Master Repository branch, master, updated. BP-openafs-stable-1_8_x-99-gf6af4a1
Gerrit Code Review
gerrit@openafs.org
Fri, 11 May 2018 08:51:49 -0400
The following commit has been merged in the master branch:
commit f6af4a155d3636e8f812e40c7169dd8902ae64be
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.
Change-Id: I1462ec43c76c0b07e9368b37a9dbaedf6b6f4409
Reviewed-on: https://gerrit.openafs.org/13045
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
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