{
  "slug": "dentry",
  "term": "Dentry",
  "aliases": [
    "Linux dentry",
    "directory cache entry"
  ],
  "definition": "A dentry is an in-memory Linux VFS object that associates a pathname component and parent with an inode or records the absence of an associated inode.",
  "note": "Identity: Dentries live in RAM, not on disk. Several dentries can refer to one inode, as with hard links; the cache object is distinct from a filesystem's stored directory record. [linux-vfs-dentry]\n\nLookup: A positive dentry has an associated inode. A negative dentry has no associated inode and can cache a name's absence; a cache miss supplies no existence answer. Resolving that miss needs further lookup. Network and clustered filesystems can require revalidation of cached information. [linux-dcache-lookup]\n\nConcurrency: A referenced negative dentry can become positive while its parent is unlocked. Cached absence therefore does not reserve a pathname or make a later create conditional on the earlier lookup. [linux-negative-dentry]",
  "advantages": [],
  "limitations": [
    "A cached name-to-inode association does not establish crash durability."
  ],
  "related": [
    "inode",
    "path-resolution",
    "hard-link",
    "nfs-lookup-cache",
    "atomic-rename"
  ],
  "status": "shipping",
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-08",
  "citations": [
    {
      "id": "linux-vfs-dentry",
      "title": "Linux v6.16: VFS dcache and inode objects",
      "url": "https://github.com/torvalds/linux/blob/038d61fd642278bab63ee8ef722c50d10ab01e8f/Documentation/filesystems/vfs.rst",
      "accessed": "2026-11-08"
    },
    {
      "id": "linux-dcache-lookup",
      "title": "Linux v6.16: pathname lookup, cache absence and revalidation",
      "url": "https://github.com/torvalds/linux/blob/038d61fd642278bab63ee8ef722c50d10ab01e8f/Documentation/filesystems/path-lookup.rst",
      "accessed": "2026-11-08"
    },
    {
      "id": "linux-negative-dentry",
      "title": "Linux v6.16: unlocked lookup helpers and changing negative dentries",
      "url": "https://github.com/torvalds/linux/blob/038d61fd642278bab63ee8ef722c50d10ab01e8f/fs/namei.c",
      "accessed": "2026-11-08"
    }
  ],
  "provenance": [
    "Source review scoped to Linux v6.16 documentation and implementation at commit 038d61fd642278bab63ee8ef722c50d10ab01e8f. No native kernel experiment or cache-performance measurement.",
    "See the namespace analysis for the separate creation and persistence contracts: https://hesela.com/analyses/atomic-rename-directory-durability/#dentry-cache"
  ]
}
