splice_from_pipe_feed(9)
π splice_from_pipe_feed(9) β like, the Kernel API Manual page, bestie
okay so picture this: it's a page straight out of the Kernel API Manual, and the star of the show is splice_from_pipe_feed(9). she's a little function, she feeds data from a pipe into a file, and honestly? she ate. let's get into it π
β¨ NAME β¨
splice_from_pipe_feed β literally just feeding the available data from a pipe to a file, no big deal, except it IS a big deal π
πΈ SYNOPSIS πΈ
int splice_from_pipe_feed (struct pipe_inode_info *pipe , struct
splice_desc *sd , splice_actor *actor );
π¦ ARGUMENTS π¦
pipeβ the pipe we're splicing from, bestie. that's the source, the vibe provider π«Άsdβ the info that gets handed over toactor. the little care package πactorβ the handler that actually does the splicing of the data. she's the one doing the work, main character energy π
π₯ DESCRIPTION π₯
okay so here's what she does: this function loops over the pipe and calls actor to do the actual moving of a single struct pipe_buffer to wherever the destination is supposed to be. that's the whole gig. iconic.
she returns when either (a) there's no more buffers left in the pipe, or (b) the requested number of bytes β that's sd->total_len, keep up β have been copied. periodt. π
and what does she return, you ask? get this:
- a positive number (
one) β meaning the pipe needs to be filled with more data π - zero β meaning the required number of bytes have been copied, we're done here β
-errnoβ an error happened, tragic, moving on π
and here's the tea β β this function, together with splice_from_pipe_{begin,end,next}, may be used to implement the functionality of __splice_from_pipe when locking is required around copying the pipe buffers to the destination. iykyk. π
π SEE ALSO π
Kernel file ./fs/splice.c:
splice_to_pipe(9)copy_splice_read(9)splice_from_pipe_next(9)splice_from_pipe_begin(9)splice_from_pipe_end(9)__splice_from_pipe(9)splice_from_pipe(9)iter_file_splice_write(9)splice_to_socket(9)vfs_splice_read(9)splice_direct_to_actor(9)do_splice_direct(9)splice_file_range(9)
like, read them. they're all in the same friend group fr fr πβ¨
ngl bestie, if you're implementing __splice_from_pipe yourself with locking around the copy, this little trio of helpers is your moment. no cap. π
okay that's the whole page!! π she's sourced from ./fs, she's dated October 2026, and she signs off as splice_from_pipe_feed(9) β mwah, love her, bye π§ββοΈβ
π¦ 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