/***************************************************************************** Copyright (c) 2015, MariaDB Corporation. 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 Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA *****************************************************************************/ /**************************************************//** @file include/fil0fil.ic The low-level file system support functions Created 31/03/2015 Jan Lindström *******************************************************/ #ifndef fil0fil_ic #define fil0fil_ic /*******************************************************************//** Return space name */ UNIV_INLINE char* fil_space_name( /*===========*/ fil_space_t* space) /*!< in: space */ { return (space->name); } /*******************************************************************//** Return space flags */ UNIV_INLINE ulint fil_space_flags( /*===========*/ fil_space_t* space) /*!< in: space */ { return (space->flags); } /*******************************************************************//** Return page type name */ UNIV_INLINE const char* fil_get_page_type_name( /*===================*/ ulint page_type) /*!< in: FIL_PAGE_TYPE */ { switch(page_type) { case FIL_PAGE_PAGE_COMPRESSED: return (const char*)"PAGE_COMPRESSED"; case FIL_PAGE_INDEX: return (const char*)"INDEX"; case FIL_PAGE_UNDO_LOG: return (const char*)"UNDO LOG"; case FIL_PAGE_INODE: return (const char*)"INODE"; case FIL_PAGE_IBUF_FREE_LIST: return (const char*)"IBUF_FREE_LIST"; case FIL_PAGE_TYPE_ALLOCATED: return (const char*)"ALLOCATED"; case FIL_PAGE_IBUF_BITMAP: return (const char*)"IBUF_BITMAP"; case FIL_PAGE_TYPE_SYS: return (const char*)"SYS"; case FIL_PAGE_TYPE_TRX_SYS: return (const char*)"TRX_SYS"; case FIL_PAGE_TYPE_FSP_HDR: return (const char*)"FSP_HDR"; case FIL_PAGE_TYPE_XDES: return (const char*)"XDES"; case FIL_PAGE_TYPE_BLOB: return (const char*)"BLOB"; case FIL_PAGE_TYPE_ZBLOB: return (const char*)"ZBLOB"; case FIL_PAGE_TYPE_ZBLOB2: return (const char*)"ZBLOB2"; case FIL_PAGE_TYPE_COMPRESSED: return (const char*)"ORACLE PAGE COMPRESSED"; default: return (const char*)"PAGE TYPE CORRUPTED"; } } /****************************************************************//** Get block size from fil node @return block size*/ UNIV_INLINE ulint fil_node_get_block_size( /*====================*/ fil_node_t* node) /*!< in: Node where to get block size */ { return (node->file_block_size); } #endif /* fil0fil_ic */