nilfs_const...sync_segment(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ nilfs_construct_dsync_segment πŸ¦‹

okay so bestie, welcome to the Kernel API Manual ✨ this one's about NILFS2 doing a little data-only segment glow-up, and honestly? it's giving very specific but very slay. let's get into it πŸ’…


πŸŽ€ NAME πŸŽ€

nilfs_construct_dsync_segment β€” construct a data-only logical segment 🌸

like, just the data. metadata stays home. she's a data-only queen. periodt.


✨ SYNOPSIS ✨

int nilfs_construct_dsync_segment (struct super_block *sb , struct inode
*inode , loff_t start , loff_t end );

four args, one int back, no cap 🫢


πŸ’– ARGUMENTS πŸ’–

  • sb β€” the super block, bestie. the big one. the main character of the filesystem.
  • inode β€” the inode whose data blocks should be written out ✍️ (yes, her data blocks specifically)
  • start β€” start byte offset, lowkey where the party begins πŸŽ‰
  • end β€” end byte offset, and heads up it's inclusive πŸ‘‘ so she's in the range too, don't do her dirty

πŸ”₯ RETURN πŸ”₯

0 on success πŸ’š β€” slay, we love a clean return.

or, if things go sideways, one of these negative error codes (yes they're negative, that's the whole vibe check):

  • -EIO β€” I/O error (including metadata corruption 😭). it's giving "the disk said no".
  • -ENOMEM β€” insufficient memory available πŸ’€ not enough RAM for the girl
  • -ENOSPC β€” no space left on device (only in a panic state πŸ™ˆ like, only then, fr fr)
  • -ERESTARTSYS β€” interrupted βœ‹ rude but it happens
  • -EROFS β€” read only filesystem 🧊 she's frozen, nobody's writing anything
bestie please note: -ENOSPC is genuinely documented as happening only in a panic state, so don't go blaming her for regular out-of-space drama, iykyk πŸ’…

🌈 SEE ALSO 🌈

Kernel file ./fs/nilfs2/segment.c β€” go read her, she's iconic πŸ“–βœ¨

and the whole friend group:


and that's the whole page bestie 🫢 sourced straight from ./fs/nilfs2, dated October 2026, filed under nilfs_const...sync_segment(9) β€” mwah πŸ’‹ go write some data-only segments, you got this πŸ¦‹β­

πŸ“¦ where this page comes from