ceph_start_io_direct(9)
β¨ 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
ceph_start_io_read(9)ceph_end_io_read(9)ceph_start_io_write(9)ceph_end_io_write(9)ceph_end_io_direct(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms