From 90002480e9fa8708987179116a2b180282628b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 10 Jan 2020 19:08:46 +0200 Subject: [PATCH] MDEV-18115: Remove OS_AIO_LOG and IORequest::LOG --- storage/innobase/fil/fil0fil.cc | 9 +-------- storage/innobase/include/os0file.h | 19 +------------------ storage/innobase/os/os0file.cc | 1 - 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index 10645acb07f..3b051f54815 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -3993,19 +3993,12 @@ fil_io( ut_ad(recv_no_ibuf_operations || req_type.is_write() || !ibuf_bitmap_page(page_id, zip_size) - || sync - || req_type.is_log()); + || sync); ulint mode; if (sync) { - mode = OS_AIO_SYNC; - - } else if (req_type.is_log()) { - - mode = OS_AIO_LOG; - } else if (req_type.is_read() && !recv_no_ibuf_operations && ibuf_page(page_id, zip_size, NULL)) { diff --git a/storage/innobase/include/os0file.h b/storage/innobase/include/os0file.h index 8949d821a86..12f21c80470 100644 --- a/storage/innobase/include/os0file.h +++ b/storage/innobase/include/os0file.h @@ -2,7 +2,7 @@ Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2009, Percona Inc. -Copyright (c) 2013, 2019, MariaDB Corporation. +Copyright (c) 2013, 2020, MariaDB Corporation. Portions of this file contain modifications contributed and copyrighted by Percona Inc.. Those modifications are @@ -187,10 +187,6 @@ static const ulint OS_FILE_ERROR_MAX = 200; /** No transformations during read/write, write as is. */ #define IORequestRead IORequest(IORequest::READ) #define IORequestWrite IORequest(IORequest::WRITE) -#define IORequestLogRead IORequest(IORequest::LOG | IORequest::READ) -#define IORequestLogWrite IORequest(IORequest::LOG | IORequest::WRITE) - - /** The IO Context that is passed down to the low level IO code */ @@ -209,9 +205,6 @@ public: /** Data file */ DATA_FILE = 8, - /** Log file request*/ - LOG = 16, - /** Disable partial read warnings */ DISABLE_PARTIAL_IO_WARNINGS = 32, @@ -279,13 +272,6 @@ public: return((m_type & WRITE) == WRITE); } - /** @return true if it is a redo log write */ - bool is_log() const - MY_ATTRIBUTE((warn_unused_result)) - { - return((m_type & LOG) == LOG); - } - /** Clear the punch hole flag */ void clear_punch_hole() { @@ -417,9 +403,6 @@ static const ulint OS_AIO_NORMAL = 21; /** Asynchronous i/o for ibuf pages or ibuf bitmap pages */ static const ulint OS_AIO_IBUF = 22; -/** Asynchronous i/o for the log */ -static const ulint OS_AIO_LOG = 23; - /**Calling thread will wait for the i/o to complete, and perform IO completion routine itself; can be used for any pages, ibuf or non-ibuf. This is used to save diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index 9634182ddd1..fe97b41849b 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -3138,7 +3138,6 @@ os_file_io( bytes_returned += n_bytes; if (offset > 0 - && !type.is_log() && type.is_write() && type.punch_hole()) { *err = type.punch_hole(file, offset, n);