Zach Brown e1f32a0f8b scoutfs: fix spurious hard stale block errors
The stale block handling code only handled the case where we read
through a stale root into blocks that have been overwritten in the
persistent store.  In this case you'll get a new root and the read will
be OK.

It didn't handle the case where we have stale blocks cached at the
blocks of the legitamate current root.  In this case we get ESTALE from
each stale block and because the root doesn't change when we retry we
assume the persistent structure is corrupt.

This case can happen when the btree ring wraps and there are still
blocks cached at the head of the ring.  This became much more possible
when we moved to small fixed size keys.

The fix is to retry reading individual blocks or segments before
returning -ESTALE and expecting the caller to get a new root and try
again.  In the stale cache case this will allow the more recent correct
blocks to be read.

Signed-off-by: Zach Brown <zab@versity.com>
2018-04-13 08:59:03 -07:00
Description
No description provided
8 MiB
Languages
C 87%
Shell 9.3%
Roff 2.5%
TeX 0.8%
Makefile 0.4%