netfs_read_s...q_terminated(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… netfs_read_s...q_terminated(9) πŸ’…

okay bestie, welcome to the Kernel API Manual ✨ this one's a tiny little function page but it's important, i promise β€” it's from the Kernel API Manual, section 9, and the title got truncated with an ellipsis so don't come for me about the ... in the name, that's literally just how it's printed 🫢


πŸ¦‹ NAME πŸ¦‹

netfs_read_subreq_terminated β€” note the termination of an I/O operation. that's it. that's the whole vibe. πŸ’€ an I/O op has ended and this function is the one that gets told about it.


✨ SYNOPSIS ✨

void netfs_read_subreq_terminated (struct netfs_io_subrequest *subreq );

like, that's the whole signature. void return, one argument, no notes. main character energy honestly πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • subreq β€” the I/O request that has terminated. that's the one. the request in question. the subreq that said "i'm done" πŸ¦‹

πŸ’– DESCRIPTION πŸ’–

so here's the tea, bestie: this function tells the read helper that a contributory I/O operation has terminated β€” one way or another β€” and that it should now integrate the results. that's the whole job. it's giving "closing the loop" fr fr ✨

the caller shows the outcome of the operation through subreq->error, and here's the iykyk part:

  • supply 0 to indicate a successful or retryable transfer β€” retryable meaning if NETFS_SREQ_NEED_RETRY is set, so keep that in mind πŸ‘€
  • or supply a negative error code for, y'know, when it did not go well 😭

the helper will look after reissuing I/O operations as appropriate, and also writing downloaded data to the cache. it's got it handled, no cap πŸ’…

🌸 before you call this, the filesystem should update subreq->transferred to track the amount of data copied into the output buffer. that part is on you, bestie β€” do not skip it πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the page!! πŸŽ€ sign-off time: this adorable little manpage lives under ./fs/netfs, and it's dated October 2026 ⭐ go forth and terminate your I/O ops responsibly, bestie πŸ’œπŸŒˆπŸ«Ά

πŸ“¦ where this page comes from