The following commit has been merged in the openafs-stable-1_8_x branch:
commit a4b3a659095cf50a4c5bb6cea69c71680817830a
Author: Mark Vitale <[email protected]>
Date: Mon Oct 29 16:48:14 2018 -0400
afs: avoid afs_GetDownDSlot panic on afs_WriteDCache failure
If afs_GetDownDSlot() finds insuffcient free slots in the
afs_freeDSList, it will walk the afs_DLRU attempting to flush and free
eligible dcaches. However, if an error occurs during the flush to
CacheItems (afs_WriteDCache()), e.g., -EINTR, afs_GetDownDSlot() will
assert.
However, a panic in this case is overkill, since afs_GetDownDSlot() is a
best-effort attempt to free dslots. The caller (afs_UFSGetDSlot()) will
allocate more dcaches if needed.
Instead:
- Refactor afs_GetDownDSlot() by moving the QRemove() call to after the
afs_WriteDCache logic, so it accompanies the logic that puts the dcache
back on the freelist. This is safe because we hold the afs_xdcache W
lock for the duration of the routine.
- If afs_WriteDCache() returns an error, return early and let the caller
handle any recovery.
Reviewed-on: https://gerrit.openafs.org/13364
Reviewed-by: Andrew Deason <[email protected]>
Tested-by: Andrew Deason <[email protected]>
Reviewed-by: Cheyenne Wills <[email protected]>
Reviewed-by: Benjamin Kaduk <[email protected]>
(cherry picked from commit d6f52d11c358f71b2c4357cb135e898de7c6277b)
Change-Id: I2630bf04b3e3a88a1fa00f693adf2a77290d47ef
Reviewed-on: https://gerrit.openafs.org/13503
Tested-by: BuildBot <[email protected]>
Reviewed-by: Cheyenne Wills <[email protected]>
Reviewed-by: Andrew Deason <[email protected]>
Reviewed-by: Benjamin Kaduk <[email protected]>
Reviewed-by: Stephan Wiesand <[email protected]>
src/afs/afs_dcache.c | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
--
OpenAFS Master Repository
_______________________________________________
OpenAFS-cvs mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-cvs