vfs_fsync_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vfs_fsync_range(9) πŸ’…

okay so this is the Kernel API Manual page for vfs_fsync_range, and it is literally a helper to sync a range of data & metadata to disk. bestie, it's giving β€œmake sure your bytes are actually on disk” energy. ✨

🌸 NAME 🌸

vfs_fsync_range β€” helper to sync a range of data & metadata to disk 🫢

πŸ¦‹ SYNOPSIS πŸ¦‹

int vfs_fsync_range (struct file *file , loff_t start , loff_t end , int datasync );

πŸŽ€ ARGUMENTS πŸŽ€

  • file β€” file to sync. like, the file you're syncing, no mystery there πŸ’–
  • start β€” offset in bytes of the beginning of data range to sync.
  • end β€” offset in bytes of the end of data range (inclusive). yes, inclusive β€” the end byte is included, okay? 😭
  • datasync β€” perform only datasync. that's it, that's the whole vibe for this one.

πŸ”₯ DESCRIPTION πŸ”₯

Write back data in range start..end and metadata for file to disk. If datasync is set, only metadata needed to access modified file data is written. periodt. πŸ’…

vibe check: keep start..end and the datasync behaviour exactly as written β€” end is inclusive, and datasync means only that specific metadata gets written. no extra lore, bestie. 🧚

🌈 SEE ALSO 🌈

Kernel file ./fs/sync.c, vfs_fsync(9) πŸ‘‘


kisses from the ./fs source corner, October 2026, vfs_fsync_range(9) edition β€” mwah πŸ’–

πŸ“¦ where this page comes from