__smb2_copychunk_range(9)
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 π
- Kernel file
./fs/smb/client/smb2ops.c calc_chunk_count(9)
xoxo, from ./fs/smb/client, dated October 2026, signing off as __smb2_copychunk_range(9) π
πβ¨
π¦ 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