0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-20 10:58:20 +02:00

ircd: Add noaio global flag; add command line option.

This commit is contained in:
Jason Volk 2018-12-01 15:55:53 -08:00
parent 965ecd16e5
commit ca525b081f
4 changed files with 6 additions and 0 deletions

View file

@ -56,6 +56,7 @@ lgetopt opts[] =
{ "pitrecdb", &ircd::pitrecdb, lgetopt::BOOL, "Allow Point-In-Time-Recover if DB reports corruption after crash" },
{ "nojs", &ircd::nojs, lgetopt::BOOL, "Disable SpiderMonkey JS subsystem from initializing. (noop when not available)." },
{ "nodirect", &ircd::nodirect, lgetopt::BOOL, "Disable direct IO (O_DIRECT) for unsupporting filesystems." },
{ "noaio", &ircd::noaio, lgetopt::BOOL, "Disable the AIO interface in favor of traditional syscalls. " },
{ nullptr, nullptr, lgetopt::STRING, nullptr },
};

View file

@ -27,6 +27,7 @@ namespace ircd
extern bool pitrecdb; ///< Allow Point-In-Time Recovery if DB corrupt.
extern bool nojs; ///< Option to not init js subsystem.
extern bool nodirect; ///< Option to not use direct IO (O_DIRECT).
extern bool noaio; ///< Option to not use AIO even if available.
}
#include "string_view.h"

View file

@ -911,6 +911,9 @@ ircd::fs::aio::stats
ircd::fs::aio::init::init()
{
assert(!context);
if(ircd::noaio)
return;
context = new kernel{};
}
#else

View file

@ -20,6 +20,7 @@ namespace ircd
bool pitrecdb; // point-in-time recovery for db
bool nojs; // no ircd::js system init.
bool nodirect; // no use of O_DIRECT.
bool noaio; // no use of fs::aio.
std::string _origin; // user's supplied param
std::string _hostname; // user's supplied param