Skip to content
  • J. Bruce Fields's avatar
    9a81ef42
    SUNRPC/cache: don't allow invalid entries to be flushed · 9a81ef42
    J. Bruce Fields authored
    
    
    Trond points out in commit 277f27e2 ("SUNRPC/cache: Allow
    garbage collection of invalid cache entries") that we allow invalid
    cache entries to persist indefinitely. That fix, however,
    reintroduces the problem fixed by Kinglong Mee's commit d6fc8821
    ("SUNRPC/Cache: Always treat the invalid cache as unexpired"), where
    an invalid cache entry is immediately removed by a flush before
    mountd responds to it. The result is that the server thread that
    should be waiting for mountd to fill in that entry instead gets an
    -ETIMEDOUT return from cache_check(). Symptoms are the server
    becoming unresponsive after a restart, reproduceable by running
    pynfs 4.1 test REBT5.
    
    Instead, take a compromise approach: allow invalid cache entries to
    be removed after they expire, but not to be removed by a cache
    flush.
    
    Fixes: 277f27e2 ("SUNRPC/cache: Allow garbage collection ... ")
    Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    9a81ef42
    SUNRPC/cache: don't allow invalid entries to be flushed
    J. Bruce Fields authored
    
    
    Trond points out in commit 277f27e2 ("SUNRPC/cache: Allow
    garbage collection of invalid cache entries") that we allow invalid
    cache entries to persist indefinitely. That fix, however,
    reintroduces the problem fixed by Kinglong Mee's commit d6fc8821
    ("SUNRPC/Cache: Always treat the invalid cache as unexpired"), where
    an invalid cache entry is immediately removed by a flush before
    mountd responds to it. The result is that the server thread that
    should be waiting for mountd to fill in that entry instead gets an
    -ETIMEDOUT return from cache_check(). Symptoms are the server
    becoming unresponsive after a restart, reproduceable by running
    pynfs 4.1 test REBT5.
    
    Instead, take a compromise approach: allow invalid cache entries to
    be removed after they expire, but not to be removed by a cache
    flush.
    
    Fixes: 277f27e2 ("SUNRPC/cache: Allow garbage collection ... ")
    Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Loading