diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index affc250d437..73cdda2dd25 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -7310,55 +7310,6 @@ class SimulatedAIOHandler { } } - /** We have now collected n_consecutive I/O requests - in the array; allocate a single buffer which can hold - all data, and perform the I/O - @return the length of the buffer */ - [[nodiscard]] ulint allocate_buffer() { - ulint len; - Slot *slot = first_slot(); - - ut_ad(m_buf == nullptr); - - if (slot->type.is_read() && m_n_elems > 1) { - len = 0; - - for (ulint i = 0; i < m_n_elems; ++i) { - len += m_slots[i]->len; - } - - m_buf = static_cast(ut::aligned_alloc(len, UNIV_PAGE_SIZE)); - } else { - len = first_slot()->len; - m_buf = first_slot()->buf; - } - - return (len); - } - - /** We have to compress the individual pages and punch - holes in them on a page by page basis when writing to - tables that can be compressed at the IO level. - @param[in] len Value returned by allocate_buffer */ - void copy_to_buffer(ulint len) { - Slot *slot = first_slot(); - - if (len > slot->len && slot->type.is_write()) { - byte *ptr = m_buf; - - ut_ad(ptr != slot->buf); - - /* Copy the buffers to the combined buffer */ - for (ulint i = 0; i < m_n_elems; ++i) { - slot = m_slots[i]; - - memmove(ptr, slot->buf, slot->len); - - ptr += slot->len; - } - } - } - /** Do the I/O with ordinary, synchronous i/o functions: */ void io() { if (first_slot()->type.is_write()) { @@ -7658,18 +7609,12 @@ static dberr_t os_aio_simulated_handler(ulint global_segment, fil_node_t **m1, srv_set_io_thread_op_info(global_segment, "consecutive i/o requests"); - // Note: We don't support write combining for simulated AIO. - // ulint total_len = handler.allocate_buffer(); - /* We release the array mutex for the time of the I/O: NOTE that this assumes that there is just one i/o-handler thread serving a single segment of slots! */ array->release(); - // Note: We don't support write combining for simulated AIO. - // handler.copy_to_buffer(total_len); - srv_set_io_thread_op_info(global_segment, "doing file i/o"); handler.io();