WeSearch

Pathname lookup – The Linux Kernel documentation

·3 min read · 0 reactions · 0 comments · 20 views
#linux#kernel#filesystems#symlinks
⚡ TL;DR · AI summary

The Linux Kernel documentation discusses the storage and lifetime of cached symlinks. It explains how symlinks are typically stored in either the inode or the page cache, and the mechanisms used for safe access to these cached entries. The article also details the complexities involved when symlinks are stored in different locations and the implications for pathname lookup.

Key facts
Original article
Kernel
Read full at Kernel →
Opening excerpt (first ~120 words) tap to expand

Storage and lifetime of cached symlinks¶ Like other filesystem resources, such as inodes and directory entries, symlinks are cached by Linux to avoid repeated costly access to external storage. It is particularly important for RCU-walk to be able to find and temporarily hold onto these cached entries, so that it doesn’t need to drop down into REF-walk. While each filesystem is free to make its own choice, symlinks are typically stored in one of two places. Short symlinks are often stored directly in the inode. When a filesystem allocates a struct inode it typically allocates extra space to store private data (a common object-oriented design pattern in the kernel). This will sometimes include space for a symlink.

Excerpt limited to ~120 words for fair-use compliance. The full article is at Kernel.

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Threads WhatsApp Bluesky Mastodon Email

Discussion

0 comments

More from Kernel