dax_direct_access(9)
β¨ dax_direct_access π«
okay so first things first, this page lives in the Kernel API Manual section (that's section 9, bestie, the kernel-API one, not the "type man and pray" one) and it's literally all about translating a device pgoff into an absolute pfn. icon behavior honestly π
πΈ NAME πΈ
dax_direct_access β translate a device pgoff to an absolute pfn β¨
π¦ SYNOPSIS π¦
long dax_direct_access (struct dax_device *dax_dev , pgoff_t pgoff ,
long nr_pages , enum dax_access_mode mode , void **kaddr , unsigned long
*pfn );
she takes six arguments and returns a long, no cap π
π ARGUMENTS π
dax_devβ adax_deviceinstance that represents the logical memory range. like, this is the device we're talking about, she's the main character πpgoffβ the offset in pages, counted from the start of the device, that you want translated π§nr_pagesβ how many consecutive pages the caller can handle relative topfn. so, how much you're ready to take in one go π«Άmodeβ an indicator of whether this is a normal access or a recovery write βkaddrβ output parameter that returns a virtual address mapping ofpfnπpfnβ output parameter that returns an absolutepfntranslation ofpgoffπ₯
bestie note: kaddr and pfn are output parameters, so they're giving results back to you, they are not input, don't come for them π
π RETURN π
- a negative
errnoif an error occurs π - otherwise, the number of pages accessible at the device relative
pgoffβ¨
like, either it's a sad negative number or it's a page count. no in-between, periodt π
π SEE ALSO π
- Kernel file
./drivers/dax/super.c struct dax_device(9)fs_dax_get_by_bdev(9)fs_put_dax(9)fs_dax_get(9)dax_set_ops(9)dax_holder(9)inode_dax(9)
go read those next, iykyk πβ¨
lowkey this whole thing lives under./drivers/dax, the page is dated October 2026, and it'sdax_direct_access(9)all the way down β that's the vibe check, we're done here π π«Άπ
π¦ 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