00001 /***************************************************************************** 00002 00003 Copyright (C) 1995, 2009, Innobase Oy. All Rights Reserved. 00004 00005 This program is free software; you can redistribute it and/or modify it under 00006 the terms of the GNU General Public License as published by the Free Software 00007 Foundation; version 2 of the License. 00008 00009 This program is distributed in the hope that it will be useful, but WITHOUT 00010 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00011 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License along with 00014 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin 00015 St, Fifth Floor, Boston, MA 02110-1301 USA 00016 00017 *****************************************************************************/ 00018 00019 /****************************************************** 00020 @file include/fsp0types.h 00021 File space management types 00022 00023 Created May 26, 2009 Vasil Dimov 00024 *******************************************************/ 00025 00026 #pragma once 00027 #ifndef fsp0types_h 00028 #define fsp0types_h 00029 00030 #include "univ.i" 00031 00032 #include "fil0fil.h" /* for FIL_PAGE_DATA */ 00033 00039 /* @{ */ 00040 #define FSP_UP ((byte)111) 00041 #define FSP_DOWN ((byte)112) 00042 #define FSP_NO_DIR ((byte)113) 00043 /* @} */ 00044 00046 #define FSP_EXTENT_SIZE (1 << (20 - UNIV_PAGE_SIZE_SHIFT)) 00047 00050 #define FSEG_PAGE_DATA FIL_PAGE_DATA 00051 00054 /* @{ */ 00056 typedef byte fseg_header_t; 00057 00058 #define FSEG_HDR_SPACE 0 00059 #define FSEG_HDR_PAGE_NO 4 00060 #define FSEG_HDR_OFFSET 8 00062 #define FSEG_HEADER_SIZE 10 00064 /* @} */ 00065 00067 #define FSP_NORMAL 1000000 00068 #define FSP_UNDO 2000000 00069 #define FSP_CLEANING 3000000 00070 /* @} */ 00071 00072 /* Number of pages described in a single descriptor page: currently each page 00073 description takes less than 1 byte; a descriptor page is repeated every 00074 this many file pages */ 00075 /* #define XDES_DESCRIBED_PER_PAGE UNIV_PAGE_SIZE */ 00076 /* This has been replaced with either UNIV_PAGE_SIZE or page_zip->size. */ 00077 00081 /* @{ */ 00082 /*--------------------------------------*/ 00083 #define FSP_XDES_OFFSET 0 /* !< extent descriptor */ 00084 #define FSP_IBUF_BITMAP_OFFSET 1 /* !< insert buffer bitmap */ 00085 /* The ibuf bitmap pages are the ones whose 00086 page number is the number above plus a 00087 multiple of XDES_DESCRIBED_PER_PAGE */ 00088 00089 #define FSP_FIRST_INODE_PAGE_NO 2 00090 /* The following pages exist 00091 in the system tablespace (space 0). */ 00092 #define FSP_IBUF_HEADER_PAGE_NO 3 00095 #define FSP_IBUF_TREE_ROOT_PAGE_NO 4 00098 /* The ibuf tree root page number in 00099 tablespace 0; its fseg inode is on the page 00100 number FSP_FIRST_INODE_PAGE_NO */ 00101 #define FSP_TRX_SYS_PAGE_NO 5 00104 #define FSP_FIRST_RSEG_PAGE_NO 6 00106 #define FSP_DICT_HDR_PAGE_NO 7 00108 /*--------------------------------------*/ 00109 /* @} */ 00110 00111 #endif /* fsp0types_h */