netfs_write...t_terminated(9)
π netfs_write_subrequest_terminated β a Kernel API Manual moment β¨
okay bestie, welcome to the netfs_write...t_terminated(9) page, like, the actual Kernel API Manual entry π this one's short and sweet and honestly kind of a vibe.
πΈ NAME πΈ
netfs_write_subrequest_terminated β literally just: note the termination of a write operation. that's it. that's the whole job π«Ά
β¨ SYNOPSIS β¨
void netfs_write_subrequest_terminated (void *_op , ssize_t
transferred_or_error );
she takes two things and returns nothing, void, no notes π
π¦ ARGUMENTS π¦
_opβ the I/O request that has terminated. the one who's done. the main character at the end of her arc πtransferred_or_errorβ the amount of data transferred, or an error code. like, pick a lane, but it's giving both β¨
π₯ DESCRIPTION π₯
okay so this function is basically you telling the library, "bestie, a contributory write I/O operation has terminated, one way or another," and the library is like "say less, I'll collect the results" π
the way you communicate the outcome is through transferred_or_error: you slide in a positive value to say how many bytes got transferred, or a negative error code if it went sideways π that's the whole contract, no cap.
and then the library handles the rest β she'll look after reissuing I/O operations as appropriate, and writing downloaded data to the cache. she's got it from here, you can go π§
heads up: when this is called, ownership of the subrequest is transferred back to the library, along with a ref. so like, don't go touching it after, that's the library's subrequest now π
and a lil design note that's actually kind of iconic: _op is a void* on purpose β so the function can be passed to kiocb::term_func without the need for a casting wrapper. no casting wrapper needed, we love efficiency β
π SEE ALSO π
Kernel file ./fs/netfs/write_collect.c β go read it, iykyk π
kisses and good luck out there π this page came to you from ./fs/netfs, dated October 2026, and yes she's serving the netfs_write...t_terminated(9) fantasy the entire time ππ«
π¦ 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