splice_file_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– splice_file_range(9) β€” your Kernel API Manual bestie πŸ’–

✨ NAME ✨

<pink>splice_file_range</pink> β€” splices data between two files for copy_file_range() πŸ’«

πŸŽ€ SYNOPSIS πŸŽ€

       ssize_t splice_file_range (struct file *in , loff_t *ppos , struct file
       *out , loff_t *opos , size_t len );

πŸ¦‹ ARGUMENTS πŸ¦‹

okay so the cast of characters is giving very much:

  • in β€” file to splice from 🌸
  • ppos β€” input file offset
  • out β€” file to splice to πŸ’–
  • opos β€” output file offset
  • len β€” number of bytes to splice ✨

πŸ’… DESCRIPTION πŸ’…

This one is for use by ->copy_file_range methods, periodt.

It’s like do_splice_direct, but with a plot twist: vfs_copy_file_range already holds start_file_write on the out file πŸ‘‘

Also important, bestie: callers already called rw_verify_area on the entire range. No cap. 🫢

🌈 SEE ALSO 🌈

Kernel file ./fs/splice.c is where the magic lives, and the whole friend group is:


huge kisses from the source at ./fs, dated October 2026 β€” this is splice_file_range(9), and yes she ate πŸ’…πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from