Caching file contents in units based on memory pages, commonly by a file mapping and an offset, rather than necessarily by the device-and-block buffer cache key used above. A file's offset must be mapped to storage before device access; the two naming systems describe different layers. How page cache and buffer cache storage relate depends on the operating system and file system. A separate duplicate copy at each layer is not a universal requirement.
For the Linux kernel interfaces documented in Buffer Heads by The kernel development community, per-block state can be attached to larger cached memory units called Linux folios; mark_buffer_dirty also marks the backing page dirty in the page cache. The documented reclamation checks include dirty state, pending buffer cache writeback and elevated reference counts. That documentation deprecates Linux buffer heads for new file systems in favour of iomap. These are platform-specific interfaces, not a definition that every page cache has Linux buffer heads or that every buffer cache has its own disjoint allocation. [ref]
The Linux kernel's per-block state structure, which can be attached to a Linux folio. Its reference counting is distinct from its dirty and valid state.
A Linux folio represents one or more base pages managed together as a unit of memory, particularly in the page cache. Its extent is power-of-two sized, physically contiguous and naturally aligned in the usual folio representation. A folio can therefore be larger than a single base page without forcing each caller to treat every constituent page as an independent cache object. The abstraction simplifies reasoning about shared state such as locking and dirty status. A large folio and a virtual-memory huge-page mapping are related mechanisms but not identical concepts.[ref]
iomap is a Linux filesystem library that iterates over file-offset ranges and provides common operations using their mappings. A filesystem can describe a logical range as mapped storage, a hole or another supported state; the common layer then performs actions such as buffered reads, writeback or direct input/output. The range-based design can handle larger extents than repeatedly mapping individual small blocks. Storage addresses are not required for every operation, since some uses inspect cached file information. It is a mapping and I/O framework, rather than a particular on-disk filesystem format.[ref]
// Destination: computer-science.bigb

Articles by others on the same topic (0)

There are currently no matching articles.