nfs_page_create_from_page(9)
π nfs_page_create_from_page β¨
so this is a page from the Kernel API Manual β yes that manual β and bestie, we're talking about nfs_page_create_from_page(9). it does exactly what it says on the tin: creates an NFS read/write request. no cap.
πΈ SYNOPSIS πΈ
struct nfs_page * nfs_page_create_from_page (struct nfs_open_context
*ctx , struct page *page , unsigned int pgbase , loff_t offset ,
unsigned int count );
literally the whole personality right there π«Ά
π ARGUMENTS π
ctxβ the open context you're working with, like your plus-one for this request πpageβ the page that's getting written, the main character of this whole operation πpgbaseβ the starting offset inside the page where the write begins, iykyk πoffsetβ the file offset for the write, where it lands in the file, periodtcountβ how many bytes we're reading or writing, the vibe check on size π₯
π¦ DESCRIPTION π¦
okay so important bit, listen up: the page must be locked by the caller. why? because that's the whole reason we never end up creating two different requests for the same page β the lock is what keeps us from being messy and duplicating ourselves π
and also, the user should make sure it's safe to sleep in this function. like, genuinely safe. don't just assume. π
fr fr, check both of those things before you call this. the lock and the sleeping. not optional, bestie.
π SEE ALSO π
Kernel file ./fs/nfs/pagelist.c, and also the whole squad β go read up on all of these:
nfs_iocounter_wait(9)nfs_async_iocounter_wait(9)nfs_page_group_sync_on_bit_locked(9)nfs_page_create_from_folio(9)nfs_unlock_request(9)nfs_unlock_and_release_request(9)nfs_free_request(9)nfs_pgio_data_destroy(9)nfs_pgio_rpcsetup(9)nfs_pgio_prepare(9)nfs_pgio_error(9)nfs_pgio_release(9)nfs_pageio_init(9)nfs_pgio_result(9)nfs_coalesce_size(9)nfs_pageio_do_add_request(9)__nfs_pageio_add_request(9)nfs_pageio_complete(9)nfs_pageio_cond_complete(9)
and that's the whole page, bestie, you ate it π source and version: from ./fs/nfs, dated October 2026 β mwah, go lock that page and slay π
β¨π§
π¦ 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