do_splice_direct(9)
π NAME π
okay so this is do_splice_direct(9), straight out of the Kernel API Manual, and it is literally the page for do_splice_direct β the helper that splices data directly between two files. no cap, that's the whole name vibe: do_splice_direct - splices data directly between two files. π
β¨ SYNOPSIS β¨
ssize_t do_splice_direct (struct file *in , loff_t *ppos , struct file
*out , loff_t *opos , size_t len , unsigned int flags );
π ARGUMENTS π
inβ the file you're splicing from bestie, aka the source file. πpposβ the input file offset. it's giving "where we're reading from" energy. β¨outβ the file you're splicing to, aka the destination file. π¦oposβ the output file offset. literally where the write side is at. πΈlenβ the number of bytes to splice. yes, the byte count, the amount, the whole point. πflagsβ the splice modifier flags. little behavior modifiers, iconic. π«Ά
π¦ DESCRIPTION π¦
so this helper is for use by do_sendfile, periodt. splice can easily emulate sendfile, but doing it in the application would incur an extra system call β literally splice in + splice out, as compared to just sendfile. so instead, this helper can splice directly through a process-private pipe. slay, no extra syscall drama. π₯
heads up bestie: callers already called rw_verify_area on the entire range. so that check is already handled, okay? π
π SEE ALSO π
the kernel file is ./fs/splice.c, and it's giving a whole friend group of splice-related icons:
splice_to_pipe(9)copy_splice_read(9)splice_from_pipe_feed(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)splice_file_range(9)
okay bye bestie πβ¨ this page is from ./fs, dated October 2026, and yes it's literally titled do_splice_direct(9) β go splice something cute ππ¦π
π¦ 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