__smb2_copychunk_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to the Kernel API Manual page for __smb2_copychunk_range(9) β€” we're doing a server-side copy of a data range and it's lowkey iconic. πŸ’–

🌸 NAME 🌸

__smb2_copychunk_range β€” server-side copy of data range ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

int __smb2_copychunk_range (const unsigned int xid , struct cifsFileInfo
*src_file , struct cifsFileInfo *dst_file , u64 src_off , u64 len , u64
dst_off );

πŸŽ€ ARGUMENTS πŸŽ€

  • xid β€” transaction id, the little receipt for the whole operation 🧾
  • src_file β€” source file, aka where the data is coming from πŸ‘‘
  • dst_file β€” destination file, aka where the data is going 🫢
  • src_off β€” source file byte offset, so you know exactly where to start reading πŸ’…
  • len β€” number of bytes to copy, the size of the vibe check πŸ“
  • dst_off β€” destination file byte offset, where the copy lands on the other side 🌈

πŸ’œ DESCRIPTION πŸ’œ

So here's the tea: this function obtains a resume key for src_file, then issues FSCTL_SRV_COPYCHUNK_WRITE IOCTLs. It splits the request into chunks limited by tcon->max_*, because we are absolutely not trying to send one giant chaotic request, no cap. πŸ”₯

⭐ RETURN ⭐

0 on success; negative errno on failure. Slay when it's 0, sad little errno when it's not. 😭

πŸ’€ SEE ALSO πŸ’€


xoxo, from ./fs/smb/client, dated October 2026, signing off as __smb2_copychunk_range(9) πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from