mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
ircd::db: Add dwarning for unaligned write w/ direct io.
This commit is contained in:
parent
a7a00287bb
commit
9236eeba75
1 changed files with 14 additions and 0 deletions
14
ircd/db.cc
14
ircd/db.cc
|
@ -5644,6 +5644,20 @@ noexcept try
|
|||
const ctx::uninterruptible::nothrow ui;
|
||||
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
|
||||
log::debug
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue