dax_layout_busy_page_range(9)
π dax_layout_busy_page_range(9) π
okay so bestie, welcome to the Kernel API Manual β yes we're reading kernel docs together, this is our bonding time π«Ά. today's main character is dax_layout_busy_page_range, and honestly? she's doing a lot of quiet heavy lifting. let's get into it β¨
πΈ NAME πΈ
dax_layout_busy_page_range β find first pinned page in @mapping π
like, literally the whole job. go find the first page that someone's got their claws in. π₯
β¨ SYNOPSIS β¨
struct page * dax_layout_busy_page_range (struct address_space *mapping
, loff_t start , loff_t end );
she returns a struct page *, periodt. π
π ARGUMENTS π
mappingβ the address space we're scanning for a page whose ref count is> 1. basically the neighborhood we're snooping through πstartβ Starting offset. the page containing'start'is included, no cap. πendβ End offset. the page containing'end'is included too (inclusive girlies rise π). but here's the cute part: if'end'isLLONG_MAX, then pages from'start'all the way till the end of file are included. the whole buffet. π
π¦ DESCRIPTION π¦
okay so real talk β DAX requires ZONE_DEVICE mapped pages, and those pages are never page->count == 1. like, never ever. not a vibe they do. π
a filesystem uses this interface to determine if any page in the mapping is busy β i.e. busy for DMA, or other get_user_pages usages. so if a page is out here living its best life being used by someone else, this function will find it. π
it is expected that the filesystem is holding locks to block the establishment of new mappings in this address_space. i.e. it expects to be able to run unmap_mapping_range and subsequently not race mapping_mapped becoming true.
β οΈ key word: expected. this isn't the function doing the locking for you, bestie β you gotta hold those locks. otherwise you're racing and racing is not the move. π
π§ SEE ALSO π§
Kernel file ./fs/dax.c:
enum dax_wake_mode(9)dax_folio_reset_order(9)dax_lock_folio(9)dax_iomap_copy_around(9)dax_iomap_rw(9)dax_fault_iter(9)dax_iomap_fault(9)dax_finish_sync_fault(9)
the whole dax friend group, iykyk ππ
and that's the page, bestie!! brought to you by the fine folks at ./fs, dated October 2026, and yes this icon is still called dax_layout_busy_page_range(9) β slay, she kept her name πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms