summaryrefslogtreecommitdiff
path: root/storage/innobase/include/buf0dblwr.h
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/include/buf0dblwr.h')
-rw-r--r--storage/innobase/include/buf0dblwr.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/storage/innobase/include/buf0dblwr.h b/storage/innobase/include/buf0dblwr.h
index a62a6400d97..1f8f23edd4e 100644
--- a/storage/innobase/include/buf0dblwr.h
+++ b/storage/innobase/include/buf0dblwr.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -29,6 +29,7 @@ Created 2011/12/19 Inaam Rana
#include "univ.i"
#include "ut0byte.h"
#include "log0log.h"
+#include "buf0types.h"
#include "log0recv.h"
#ifndef UNIV_HOTBACKUP
@@ -40,9 +41,10 @@ extern ibool buf_dblwr_being_created;
/****************************************************************//**
Creates the doublewrite buffer to a new InnoDB installation. The header of the
-doublewrite buffer is placed on the trx system header page. */
-UNIV_INTERN
-void
+doublewrite buffer is placed on the trx system header page.
+@return true if successful, false if not. */
+__attribute__((warn_unused_result))
+bool
buf_dblwr_create(void);
/*==================*/
@@ -51,29 +53,24 @@ At a database startup initializes the doublewrite buffer memory structure if
we already have a doublewrite buffer created in the data files. If we are
upgrading to an InnoDB version which supports multiple tablespaces, then this
function performs the necessary update operations. If we are in a crash
-recovery, this function loads the pages from double write buffer into memory. */
-void
+recovery, this function loads the pages from double write buffer into memory.
+@return DB_SUCCESS or error code */
+dberr_t
buf_dblwr_init_or_load_pages(
-/*=========================*/
os_file_t file,
- char* path,
- bool load_corrupt_pages);
+ const char* path);
-/****************************************************************//**
-Process the double write buffer pages. */
+/** Process and remove the double write buffer pages for all tablespaces. */
void
buf_dblwr_process(void);
-/*===================*/
/****************************************************************//**
frees doublewrite buffer. */
-UNIV_INTERN
void
buf_dblwr_free(void);
/*================*/
/********************************************************************//**
Updates the doublewrite buffer when an IO request is completed. */
-UNIV_INTERN
void
buf_dblwr_update(
/*=============*/
@@ -83,7 +80,6 @@ buf_dblwr_update(
Determines if a page number is located inside the doublewrite buffer.
@return TRUE if the location is inside the two blocks of the
doublewrite buffer */
-UNIV_INTERN
ibool
buf_dblwr_page_inside(
/*==================*/
@@ -92,18 +88,23 @@ buf_dblwr_page_inside(
Posts a buffer page for writing. If the doublewrite memory buffer is
full, calls buf_dblwr_flush_buffered_writes and waits for for free
space to appear. */
-UNIV_INTERN
void
buf_dblwr_add_to_batch(
/*====================*/
buf_page_t* bpage); /*!< in: buffer block to write */
+
+/********************************************************************//**
+Flush a batch of writes to the datafiles that have already been
+written to the dblwr buffer on disk. */
+void
+buf_dblwr_sync_datafiles();
+
/********************************************************************//**
Flushes possible buffered writes from the doublewrite memory buffer to disk,
and also wakes up the aio thread if simulated aio is used. It is very
important to call this function after a batch of writes has been posted,
and also when we may have to wait for a page latch! Otherwise a deadlock
of threads can occur. */
-UNIV_INTERN
void
buf_dblwr_flush_buffered_writes(void);
/*=================================*/
@@ -115,7 +116,6 @@ flushes in the doublewrite buffer are in use we wait here for one to
become free. We are guaranteed that a slot will become free because any
thread that is using a slot must also release the slot before leaving
this function. */
-UNIV_INTERN
void
buf_dblwr_write_single_page(
/*========================*/