inode_dio_wait(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… inode_dio_wait β€” Kernel API Manual (yes bestie, the kernel API manual)

okay so picture this: you're in the kernel, in inode_dio_wait(9), and your whole personality for the next however-long is waiting. iconic honestly. this one's from the Kernel API Manual and she's short but she ATE. πŸŽ€


✨ NAME ✨

inode_dio_wait β€” wait for outstanding DIO requests to finish πŸ¦‹

like literally just sit there and let the direct I/O girlies finish their thing bestie.


🌸 SYNOPSIS 🌸

void inode_dio_wait (struct inode *inode );

no cap, that's the whole signature. returns nothing. void. she gives nothing and that's the point πŸ’…


🫢 ARGUMENTS 🫢

  • inode β€” the inode to wait for. that's it. that's the argument. she's the main character of this function and you're just here for the ride ✨

πŸ’– DESCRIPTION πŸ’–

Waits for all pending direct I/O requests to finish so that we can proceed with a truncate or equivalent operation. fr fr, it's the "everyone out of the pool before we drain it" of the kernel 😭

Must be called under a lock that serializes taking new references to i_dio_count, usually by inode->i_rwsem.

🚨 okay this is the part where you pay attention bestie β€” the lock thing is not a vibe suggestion. It's a must. You need to already be holding a lock that serializes taking new references to i_dio_count, and the usual suspect is inode->i_rwsem. Don't skip this, iykyk. πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, honestly. Kernel file ./fs/inode.c and like everyone she's ever been in a group chat with:


and that's the page!! short, sweet, and absolutely not to be called without your lock held πŸ’€ stay safe out there and slay your truncates 🧚

πŸ’– sign-off time πŸ’– this little masterpiece came out of ./fs and is dated October 2026, so yes she's a Libra (or Scorpio, depends on the day, don't @ me). go read inode_dio_wait(9)'s friends now bestie, ily πŸ“βœ¨

πŸ“¦ where this page comes from