From 31ec9b984e9a6c81193989506e300f3b7a8df7fc Mon Sep 17 00:00:00 2001 From: Christian Hagemeier Date: Thu, 30 Jan 2025 10:48:10 +0000 Subject: [PATCH] Invalidate the negative cache Signed-off-by: Christian Hagemeier --- mountpoint-s3/CHANGELOG.md | 3 +++ mountpoint-s3/src/superblock.rs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/mountpoint-s3/CHANGELOG.md b/mountpoint-s3/CHANGELOG.md index d3e6bbeb2..d51849243 100644 --- a/mountpoint-s3/CHANGELOG.md +++ b/mountpoint-s3/CHANGELOG.md @@ -2,6 +2,9 @@ * Add support for appending to objects originally uploaded with a CRC64-NVME checksum. ([#1235](https://github.com/awslabs/mountpoint-s3/pull/1235)) +### Other Changes +* Fix an issue where file names were not expelled from negative cache. + ## v1.14.0 (January 10, 2025) ### New features diff --git a/mountpoint-s3/src/superblock.rs b/mountpoint-s3/src/superblock.rs index e943bdfde..49bc642a0 100644 --- a/mountpoint-s3/src/superblock.rs +++ b/mountpoint-s3/src/superblock.rs @@ -367,6 +367,8 @@ impl Superblock { let inode = self .inner .create_inode_locked(&parent_inode, &mut parent_state, name, kind, state, true)?; + // Expel inode from negative cache, if it is present + self.inner.negative_cache.remove(parent_inode.ino(), name); LookedUp { inode, stat } };