mirror of
https://github.com/matrix-construct/construct
synced 2024-07-07 11:08:34 +02:00
ircd::db: Add dwarning for unaligned write w/ direct io.
This commit is contained in:
parent
a7a00287bb
commit
9236eeba75
14
ircd/db.cc
14
ircd/db.cc
|
@ -5644,6 +5644,20 @@ noexcept try
|
||||||
const ctx::uninterruptible::nothrow ui;
|
const ctx::uninterruptible::nothrow ui;
|
||||||
const std::lock_guard<decltype(mutex)> lock{mutex};
|
const std::lock_guard<decltype(mutex)> lock{mutex};
|
||||||
|
|
||||||
|
if(!aligned(logical_offset) || !aligned(data(s)))
|
||||||
|
log::dwarning
|
||||||
|
{
|
||||||
|
log, "'%s': ALIGNMENT CHECK fd:%d append:%p%s bytes:%zu%s logical_offset:%zu%s",
|
||||||
|
d.name,
|
||||||
|
int(fd),
|
||||||
|
data(s),
|
||||||
|
aligned(data(s))? "" : "#AC",
|
||||||
|
size(s),
|
||||||
|
aligned(size(s))? "" : "#AC",
|
||||||
|
logical_offset,
|
||||||
|
aligned(logical_offset)? "" : "#AC"
|
||||||
|
};
|
||||||
|
|
||||||
#ifdef RB_DEBUG_DB_ENV
|
#ifdef RB_DEBUG_DB_ENV
|
||||||
log::debug
|
log::debug
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue