diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index 210ee85798c..b32a2fa77ef 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -1792,6 +1792,9 @@ LinuxAIOHandler::resubmit(Slot* slot) iocb->data = slot; + ut_a(reinterpret_cast(iocb->u.c.buf) % OS_FILE_LOG_BLOCK_SIZE + == 0); + /* Resubmit an I/O request */ int ret = io_submit(m_array->io_ctx(m_segment), 1, &iocb); ut_a(ret != -EINVAL); @@ -2160,6 +2163,9 @@ AIO::linux_dispatch(Slot* slot) io_ctx_index = (slot->pos * m_n_segments) / m_slots.size(); + ut_a(reinterpret_cast(iocb->u.c.buf) % OS_FILE_LOG_BLOCK_SIZE + == 0); + int ret = io_submit(io_ctx(io_ctx_index), 1, &iocb); ut_a(ret != -EINVAL); @@ -2352,6 +2358,8 @@ AIO::is_linux_native_aio_supported() io_prep_pread(p_iocb, fd, ptr, 512, 0); } + ut_a(reinterpret_cast(p_iocb->u.c.buf) % OS_FILE_LOG_BLOCK_SIZE + == 0); int err = io_submit(io_ctx, 1, &p_iocb); ut_a(err != -EINVAL); @@ -6271,6 +6279,10 @@ AIO::reserve_slot( os_offset_t offset, ulint len) { + ut_ad(reinterpret_cast(buf) % OS_FILE_LOG_BLOCK_SIZE == 0); + ut_ad(offset % OS_FILE_LOG_BLOCK_SIZE == 0); + ut_ad(len % OS_FILE_LOG_BLOCK_SIZE == 0); + #ifdef WIN_ASYNC_IO ut_a((len & 0xFFFFFFFFUL) == len); #endif /* WIN_ASYNC_IO */