STRUCT ADDRESS_SPACE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

struct address_space β€” Contents of a cacheable, mappable object. This is from the kernel API manual, section 9, and bestie, struct address_space(9) is literally the main character here. πŸ‘‘


✨ SYNOPSIS ✨

       struct address_space {
           struct inode            *host;
           struct xarray           i_pages;
           struct rw_semaphore     invalidate_lock;
           gfp_t gfp_mask;
           atomic_t i_mmap_writable;
           struct rb_root_cached   i_mmap;
           unsigned long           nrpages;
           pgoff_t writeback_index;
           const struct address_space_operations *a_ops;
           unsigned long           flags;
           errseq_t wb_err;
           spinlock_t i_private_lock;
           struct rw_semaphore     i_mmap_rwsem;
        };

🌸 MEMBERS 🌸

Vibe check: every member is right here, no skips, no cap. πŸ’…

  • host β€” Owner, either the inode or the block_device. πŸ‘‘
  • i_pages β€” Cached pages. πŸŽ€
  • invalidate_lock β€” Guards coherency between page cache contents and file offset->disk block mappings in the filesystem during invalidates. It is also used to block modification of page cache contents through memory mappings. πŸ”₯
  • gfp_mask β€” Memory allocation flags to use for allocating pages. ✨
  • i_mmap_writable β€” Number of VM_SHARED, VM_MAYWRITE mappings. πŸ¦‹
  • i_mmap β€” Tree of private and shared mappings. 🌸
  • nrpages β€” Number of page entries, protected by the i_pages lock. πŸ’–
  • writeback_index β€” Writeback starts here. 🫢
  • a_ops β€” Methods. 🧚
  • flags β€” Error bits and flags (AS_*). ⭐
  • wb_err β€” The most recent error which has occurred. 😭
  • i_private_lock β€” For use by the owner of the address_space. πŸ”
  • i_mmap_rwsem β€” Protects i_mmap and i_mmap_writable. πŸ’œ

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./include/linux/fs.h, plus all these cross-refs β€” iykyk. 🌈


✿ source: ./include/linux · date: October 2026 · manual page: struct address_space(9) ✿

πŸ“¦ where this page comes from