afs: Skip IsDCacheSizeOK for CDirty/VDIR
IsDCacheSizeOK currently can incorrectly flag a dcache as corrupted,
since the size of a dcache may not match the size of the underlying
file in a couple of RW conditions:
- If someone is writing to a file beyond EOF, the intermediate
'sparse' area may be populated by 0-length dcaches until the data is
written to the fileserver.
- Directories may be modified locally instead of being fetched from
the fileserver, which can sometimes result in a directory blob of
differing sizes.
To avoid false positives detecting dcache corruption, just skip the
IsDCacheSizeOK check for directories, and any file with pending writes
(CDirty).
Also add some extra information to the logging messages when this
"corruption" is detected, so false positives may be more easily
detected in the future.
Change-Id: I5130287d0de791cffea85aaec5a0899d5c8d092e
Reviewed-on: https://gerrit.openafs.org/13747
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>