0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

ircd::fs: Add slice_usage_warning around io_submit() / open(2).

This commit is contained in:
Jason Volk 2019-02-12 10:50:36 -08:00
parent 95dbc571f8
commit 4d95daf8e3
2 changed files with 11 additions and 0 deletions

View file

@ -1087,6 +1087,11 @@ ircd::fs::fd::fd(const string_view &path,
:fdno{[&path, &opts]
() -> int
{
const ctx::slice_usage_warning message
{
"fs::fs::fd(): open(2): %s", path
};
uint flags(opts.flags);
flags |= opts.direct? O_DIRECT : 0UL;
flags |= opts.cloexec? O_CLOEXEC : 0UL;

View file

@ -614,6 +614,12 @@ try
assert(qcount > 0);
assert(in_flight + qcount <= MAX_EVENTS);
assert(in_flight + qcount <= max_events());
const ctx::slice_usage_warning message
{
"fs::aio::system::submit(in_flight:%zu qcount:%zu)",
in_flight,
qcount
};
const bool idle
{