OpenAFS Master Repository branch, openafs-stable-1_8_x, updated. openafs-stable-1_8_10-20-gb46d632

Gerrit Code Review
Thu, 5 Oct 2023 07:36:37 -0400

The following commit has been merged in the openafs-stable-1_8_x branch:
commit b46d63252b7b8575dd7a79fbd779725f63202afc
Author: Andrew Deason <>
Date:   Thu Jan 17 16:21:25 2019 -0600

    afs: Check dcache size when checking DVs
    Currently, if the dcache for a file has nonsensical length (due to
    cache corruption or other bugs), we never notice, and we serve
    obviously bad data to applications. For example, the vcache metadata
    for a file may say the file is 2k bytes long, but the dcache for that
    file only has 1k bytes in it (or more commonly, 0 bytes).
    This situation is easily detectable, since the dcache and vcache refer
    to the same version of the same file (when the DVs match), and so we
    can check if the two lengths make sense together. So to avoid giving
    bad data to userspace applications, perform a sanity check on the
    lengths at the same time we check for DV matches (to see if the dcache
    looks "fresh" and not stale). If the lengths do not make sense
    together, we just pretend that the dcache is old, and so we'll ignore
    it and fetch a new copy from the fileserver.
    Also check the size of the data fetched from the fileserver for a
    newly-fetched dcache in afs_GetDCache, to avoid returning a bad dcache
    if the dcache isn't already present in the cache.
    Reviewed-by: Benjamin Kaduk <>
    Tested-by: BuildBot <>
    (cherry picked from commit 7c60a0fba11dd24494a5f383df8bea5fdbabbdd7)
    Change-Id: I197d197f3f2eaf0473c76c60c9df842a3bed934a
    Tested-by: BuildBot <>
    Reviewed-by: Mark Vitale <>
    Reviewed-by: Stephan Wiesand <>

 src/afs/afs_dcache.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 93 insertions(+), 3 deletions(-)

OpenAFS Master Repository