diff options
| author | Xiubo Li <xiubo.li@clyso.com> | 2026-07-23 14:28:19 +0800 |
|---|---|---|
| committer | Ilya Dryomov <idryomov@gmail.com> | 2026-08-26 19:57:26 +0200 |
| commit | af59562a5b3d34fb3aa7753f2543393578d06dbf (patch) | |
| tree | 110c01c76444b481c04bb89cce68f0207773ec67 /scripts | |
| parent | 699411a3534139e0edde1e7fc190c3eea0786ffc (diff) | |
| download | linux-af59562a5b3d34fb3aa7753f2543393578d06dbf.tar.gz linux-af59562a5b3d34fb3aa7753f2543393578d06dbf.zip | |
ceph: do not cache negative dentries for snapped directories
When a LOOKUP/LOOKUPSNAP in a snapped directory returns ENOENT
without a trace, ceph_finish_lookup() creates a negative dentry
via d_add(dentry, NULL). For live directories this is fine — the
dentry naturally expires. But for snapped directories,
ceph_d_revalidate() unconditionally trusts all cached dentries
(valid = 1), so a negative dentry created by a transient error
persists forever, hiding entries that genuinely exist in the
snapshot.
Only cache negative dentries for live (non-snapshotted) parent
directories. For snapped parents, skip the negative dentry so
that VFS retries the lookup on the next access. Since the
conditions that trigger a negative dentry (MDS transient error,
local ENOENT shortcut, or MDS null dentry lease) are all rare in
snapped directories, the performance impact of this change is
negligible.
Link: https://tracker.ceph.com/issues/78529
Reported-by: Andras Pataki <apataki@flatironinstitute.org>
Signed-off-by: Xiubo Li <xiubo.li@clyso.com>
Reviewed-by: Viacheslav Dubeyko <slava@dubeyko.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
