]> git.michaelhowe.org Git - packages/o/openafs.git/commit
afs: WriteThroughDSlots: Avoid write error panic
authorAndrew Deason <adeason@sinenomine.net>
Mon, 30 Apr 2018 22:58:43 +0000 (17:58 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Sat, 2 Jun 2018 22:20:50 +0000 (18:20 -0400)
commit92de7260ee45200b6832cb7f727a582fc37c3699
tree2af9a03ddf6ef244eb5df72816332b98c6bf8cd9
parente05a095455294feff4e1b28a432896222a3ffd94
afs: WriteThroughDSlots: Avoid write error panic

Currently, afs_WriteThroughDSlots panics if our call to
afs_WriteDCache fails. Since afs_WriteThroughDSlots is called every
minute by a background daemon, this means that if our cache fs becomes
inaccessible (by being forced read-only, or for any other reason), we
are virtually guaranteed to panic relatively quickly.

To try to avoid this at least for some cases, change
afs_WriteThroughDSlots to return an error to our caller when we
encounter such an error. For our background task, we can just ignore
the error and retry the writes on a future iteration. During shutdown,
we still panic if we encounter an error, to try to avoid silently
allowing a corrupt cache to be used on subsequent boots.

Reviewed-on: https://gerrit.openafs.org/13047
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 46d5695a383b2b993fdd598b770f4e3c0e1a41f3)

Change-Id: Iccbec550c00ac725c0033b075ac3cd0b4e1c78c2
Reviewed-on: https://gerrit.openafs.org/13073
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/afs_daemons.c
src/afs/afs_dcache.c
src/afs/afs_init.c
src/afs/afs_prototypes.h