netfs_write...t_terminated(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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