Skip to content

Commit 09c5c33

Browse files
committed
Follow-up to MDEV-13690: Remove unused globals
buf_flush_batch(), buf_flush_stats(): Declare static. buf_flush_common(): Remove (unused function).
1 parent 6ec3de5 commit 09c5c33

File tree

2 files changed

+5
-67
lines changed

2 files changed

+5
-67
lines changed

storage/innobase/buf/buf0flu.cc

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,6 +1870,7 @@ not guaranteed that the actual number is that big, though)
18701870
@param[in] lsn_limit in the case of BUF_FLUSH_LIST all blocks whose
18711871
oldest_modification is smaller than this should be flushed (if their number
18721872
does not exceed min_n), otherwise ignored */
1873+
static
18731874
void
18741875
buf_flush_batch(
18751876
buf_pool_t* buf_pool,
@@ -1909,6 +1910,7 @@ Gather the aggregated stats for both flush list and LRU list flushing.
19091910
@param page_count_flush number of pages flushed from the end of the flush_list
19101911
@param page_count_LRU number of pages flushed from the end of the LRU list
19111912
*/
1913+
static
19121914
void
19131915
buf_flush_stats(
19141916
/*============*/
@@ -1925,6 +1927,7 @@ buf_flush_stats(
19251927

19261928
/******************************************************************//**
19271929
Start a buffer flush batch for LRU or flush list */
1930+
static
19281931
ibool
19291932
buf_flush_start(
19301933
/*============*/
@@ -1955,23 +1958,9 @@ buf_flush_start(
19551958
return(TRUE);
19561959
}
19571960

1958-
/******************************************************************//**
1959-
Gather the aggregated stats for both flush list and LRU list flushing */
1960-
void
1961-
buf_flush_common(
1962-
/*=============*/
1963-
buf_flush_t flush_type, /*!< in: type of flush */
1964-
ulint page_count) /*!< in: number of pages flushed */
1965-
{
1966-
buf_dblwr_flush_buffered_writes();
1967-
1968-
ut_a(flush_type == BUF_FLUSH_LRU || flush_type == BUF_FLUSH_LIST);
1969-
1970-
srv_stats.buf_pool_flushed.add(page_count);
1971-
}
1972-
19731961
/******************************************************************//**
19741962
End a buffer flush batch for LRU or flush list */
1963+
static
19751964
void
19761965
buf_flush_end(
19771966
/*==========*/

storage/innobase/include/buf0flu.h

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*****************************************************************************
22
33
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
4-
Copyright (c) 2014, 2017, MariaDB Corporation.
4+
Copyright (c) 2014, 2018, MariaDB Corporation.
55
66
This program is free software; you can redistribute it and/or modify it under
77
the terms of the GNU General Public License as published by the Free Software
@@ -424,57 +424,6 @@ class FlushObserver {
424424
bool m_interrupted;
425425
};
426426

427-
/******************************************************************//**
428-
Start a buffer flush batch for LRU or flush list */
429-
ibool
430-
buf_flush_start(
431-
/*============*/
432-
buf_pool_t* buf_pool, /*!< buffer pool instance */
433-
buf_flush_t flush_type); /*!< in: BUF_FLUSH_LRU
434-
or BUF_FLUSH_LIST */
435-
/******************************************************************//**
436-
End a buffer flush batch for LRU or flush list */
437-
void
438-
buf_flush_end(
439-
/*==========*/
440-
buf_pool_t* buf_pool, /*!< buffer pool instance */
441-
buf_flush_t flush_type); /*!< in: BUF_FLUSH_LRU
442-
or BUF_FLUSH_LIST */
443-
/******************************************************************//**
444-
Gather the aggregated stats for both flush list and LRU list flushing */
445-
void
446-
buf_flush_common(
447-
/*=============*/
448-
buf_flush_t flush_type, /*!< in: type of flush */
449-
ulint page_count); /*!< in: number of pages flushed */
450-
451-
/*******************************************************************//**
452-
This utility flushes dirty blocks from the end of the LRU list or flush_list.
453-
NOTE 1: in the case of an LRU flush the calling thread may own latches to
454-
pages: to avoid deadlocks, this function must be written so that it cannot
455-
end up waiting for these latches! NOTE 2: in the case of a flush list flush,
456-
the calling thread is not allowed to own any latches on pages! */
457-
__attribute__((nonnull))
458-
void
459-
buf_flush_batch(
460-
/*============*/
461-
buf_pool_t* buf_pool, /*!< in: buffer pool instance */
462-
buf_flush_t flush_type, /*!< in: BUF_FLUSH_LRU or
463-
BUF_FLUSH_LIST; if BUF_FLUSH_LIST,
464-
then the caller must not own any
465-
latches on pages */
466-
ulint min_n, /*!< in: wished minimum mumber of blocks
467-
flushed (it is not guaranteed that the
468-
actual number is that big, though) */
469-
lsn_t lsn_limit, /*!< in: in the case of BUF_FLUSH_LIST
470-
all blocks whose oldest_modification is
471-
smaller than this should be flushed
472-
(if their number does not exceed
473-
min_n), otherwise ignored */
474-
flush_counters_t* n); /*!< out: flushed/evicted page
475-
counts */
476-
477-
478427
#include "buf0flu.ic"
479428

480429
#endif

0 commit comments

Comments
 (0)