gfs2_file_write_iter(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so welcome to the gfs2_file_write_iter(9) page from the Kernel API Manual, bestie ✨ β€” gfs2_file_write_iter is literally here to perform a write to a file. iconic behavior, no cap πŸ’…


✨ SYNOPSIS ✨

ssize_t gfs2_file_write_iter (struct kiocb *iocb , struct iov_iter *from
);

🫢 ARGUMENTS 🫢

  • iocb β€” the io context. that's the context/vibe of this I/O moment, iykyk πŸ¦‹
  • from β€” the data to write. yes bestie, this is the data going in πŸŽ€

πŸŽ€ DESCRIPTION πŸŽ€

real talk: we have to do a lock/unlock right here to refresh the inode size for O_APPEND writes. if we don't, we can land up writing at the wrong offset πŸ˜­πŸ’€

there is still a race β€” yes, even with this β€” but provided the app is using its own file locking, this will make O_APPEND work as expected. periodt πŸ”₯

bestie please note: the race is still there. this is not a magic β€œno more races” button, it's a β€œmakes O_APPEND behave as expected when the app does its own file locking” situation 🫢

🌈 SEE ALSO 🌈

Kernel file ./fs/gfs2/file.c is the home base, and the rest of the squad is:


mwah πŸ’‹ β€” this little page lives in ./fs/gfs2 and it's dated October 2026, slay πŸŽ€βœ¨

πŸ“¦ where this page comes from