0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-07-04 17:48:35 +02:00

ircd::db: Add dwarning for unaligned write w/ direct io.

This commit is contained in:
Jason Volk 2018-12-12 15:18:26 -08:00
parent a7a00287bb
commit 9236eeba75

View file

@ -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
{