vfs_splice_read(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

vfs_splice_read β€” Read data from a file and splice it into a pipe. That's the whole NAME moment, bestie. This is the vfs_splice_read(9) page from the Kernel API Manual, and it's lowkey iconic πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

The signature is literally this, no cap:

ssize_t vfs_splice_read (struct file *in , loff_t *ppos , struct pipe_inode_info *pipe , size_t len , unsigned int flags );

πŸŽ€ ARGUMENTS πŸŽ€

  • in β€” File to splice from
  • ppos β€” Input file offset
  • pipe β€” Pipe to splice to
  • len β€” Number of bytes to splice
  • flags β€” Splice modifier flags (SPLICE_F_*)

πŸ¦‹ DESCRIPTION πŸ¦‹

Splice the requested amount of data from the input file to the pipe. This is synchronous as the caller must hold the pipe lock across the entire operation β€” yes, the whole thing, bestie πŸ”₯

If successful, it returns the amount of data spliced, 0 if it hit the EOF or a hole, and a negative error code otherwise. That's the return vibe check, periodt πŸ’…

🌈 SEE ALSO 🌈

The SEE ALSO section is a whole friend group: Kernel file ./fs/splice.c plus these besties β€”


xoxo, source ./fs Β· October 2026 Β· vfs_splice_read(9) πŸ’–πŸ«ΆπŸ’…

πŸ“¦ where this page comes from