0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 07:23:53 +01:00

ircd::fs: Add a nodelay option on reads.

This commit is contained in:
Jason Volk 2018-12-26 15:41:12 -08:00
parent 7a9d70f15d
commit 444000faf1
2 changed files with 6 additions and 0 deletions

View file

@ -63,6 +63,11 @@ struct ircd::fs::read_opts
/// an exception will be thrown. We default to true because we have faith
/// in the useful propagation of an exception for this event.
bool interruptible {true};
/// Submits the I/O request immediately rather than allowing IRCd to
/// queue requests for a few iterations of the ircd::ios event loop.
/// (only relevant to aio).
bool nodelay {false};
};
inline

View file

@ -503,6 +503,7 @@ noexcept try
// non-reading events, even for different files and locations. It may
// be possible to optimize this condition.
|| request.aio_lio_opcode != IOCB_CMD_PREADV
|| request.ropts->nodelay
};
if(flush_now)