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:
parent
965ecd16e5
commit
ca525b081f
|
@ -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 },
|
||||
};
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -911,6 +911,9 @@ ircd::fs::aio::stats
|
|||
ircd::fs::aio::init::init()
|
||||
{
|
||||
assert(!context);
|
||||
if(ircd::noaio)
|
||||
return;
|
||||
|
||||
context = new kernel{};
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue