ceph_start_io_direct(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

ceph_start_io_direct β€” declare the file is being used for direct i/o πŸ’…

Okay bestie, welcome to the Kernel API Manual page for ceph_start_io_direct(9) β€” manual name folded in right here, cute and compliant πŸ¦‹. This function is lowkey giving kernel-internals main character energy.


πŸ’… SYNOPSIS πŸ’…

int ceph_start_io_direct (struct inode *inode );

πŸŽ€ ARGUMENTS πŸŽ€

  • inode β€” file inode. That’s the whole argument list, no extra crumbs πŸ“.

πŸ”₯ DESCRIPTION πŸ”₯

So ceph_start_io_direct is the function you call to declare that a direct I/O operation is about to start, and it makes sure we block all buffered I/O. Periodt.

On exit, the function ensures that the CEPH_I_ODIRECT flag is set, and holds a shared lock on inode->i_rwsem to ensure that the flag cannot be changed. No cap.

In practice, this means direct I/O operations are allowed to execute in parallel, thanks to the shared lock, whereas buffered I/O operations need to wait to grab an exclusive lock in order to clear CEPH_I_ODIRECT. The way that works is honestly kind of iconic.

Also note: buffered writes and truncates both take a write lock on inode->i_rwsem, meaning those are serialised w.r.t. O_DIRECT. πŸ’€


🌈 SEE ALSO 🌈

Kernel file ./fs/ceph/io.c


Catch you in the source tree, bestie 🫢 β€” this page is from the ./fs/ceph source/version, dated October 2026, and the manual tag is ceph_start_io_direct(9) βœ¨πŸ’–

πŸ“¦ where this page comes from