netfs_file_write_iter(9)
β¨ netfs_file_write_iter(9) β¨
hey bestie, welcome to the Kernel API Manual entry for netfs_file_write_iter(9) β we're writing data to a file and we're gonna understand it, periodt π
π NAME π
netfs_file_write_iter β write data to a file π
π¦ SYNOPSIS π¦
ssize_t netfs_file_write_iter (struct kiocb *iocb , struct iov_iter
*from );
πΈ ARGUMENTS πΈ
iocbβ the IO state structure, aka the vibe check for this IO operation β¨fromβ aniov_itercarrying the data to write π«Ά
π₯ DESCRIPTION π₯
okay so this one performs a write to a file. If it can, it writes into the pagecache; if it can't, it does an unbuffered write instead. that's the whole plot, no cap π
π RETURN π
- A negative error code if no data has been written at all, or
vfs_fsync_rangefailed for a synchronous write π - The number of bytes written, even for truncated writes β yes, even then, bestie π
π SEE ALSO π
Kernel file ./fs/netfs/buffered_write.c: netfs_perform_write(9), netfs_buffered_write_iter_locked(9) π
mwah π this icon lives under ./fs/netfs, dated October 2026, and it's the netfs_file_write_iter(9) page from the Kernel API Manual. byeee π«Ά
π¦ 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