Drizzled Public API Documentation

fsp0types.h
1 /*****************************************************************************
2 
3 Copyright (C) 1995, 2009, Innobase Oy. All Rights Reserved.
4 
5 This program is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free Software
7 Foundation; version 2 of the License.
8 
9 This program is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12 
13 You should have received a copy of the GNU General Public License along with
14 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15 St, Fifth Floor, Boston, MA 02110-1301 USA
16 
17 *****************************************************************************/
18 
19 /******************************************************
20 @file include/fsp0types.h
21 File space management types
22 
23 Created May 26, 2009 Vasil Dimov
24 *******************************************************/
25 
26 #pragma once
27 #ifndef fsp0types_h
28 #define fsp0types_h
29 
30 #include "univ.i"
31 
32 #include "fil0fil.h" /* for FIL_PAGE_DATA */
33 
39 /* @{ */
40 #define FSP_UP ((byte)111)
41 #define FSP_DOWN ((byte)112)
42 #define FSP_NO_DIR ((byte)113)
43 /* @} */
44 
46 #define FSP_EXTENT_SIZE (1U << (20 - UNIV_PAGE_SIZE_SHIFT))
47 
50 #define FSEG_PAGE_DATA FIL_PAGE_DATA
51 
54 /* @{ */
56 typedef byte fseg_header_t;
57 
58 #define FSEG_HDR_SPACE 0
59 #define FSEG_HDR_PAGE_NO 4
60 #define FSEG_HDR_OFFSET 8
62 #define FSEG_HEADER_SIZE 10
64 /* @} */
65 
67 #define FSP_NORMAL 1000000
68 #define FSP_UNDO 2000000
69 #define FSP_CLEANING 3000000
70 /* @} */
71 
72 /* Number of pages described in a single descriptor page: currently each page
73 description takes less than 1 byte; a descriptor page is repeated every
74 this many file pages */
75 /* #define XDES_DESCRIBED_PER_PAGE UNIV_PAGE_SIZE */
76 /* This has been replaced with either UNIV_PAGE_SIZE or page_zip->size. */
77 
81 /* @{ */
82 /*--------------------------------------*/
83 #define FSP_XDES_OFFSET 0 /* !< extent descriptor */
84 #define FSP_IBUF_BITMAP_OFFSET 1 /* !< insert buffer bitmap */
85  /* The ibuf bitmap pages are the ones whose
86  page number is the number above plus a
87  multiple of XDES_DESCRIBED_PER_PAGE */
88 
89 #define FSP_FIRST_INODE_PAGE_NO 2
90  /* The following pages exist
91  in the system tablespace (space 0). */
92 #define FSP_IBUF_HEADER_PAGE_NO 3
95 #define FSP_IBUF_TREE_ROOT_PAGE_NO 4
98  /* The ibuf tree root page number in
99  tablespace 0; its fseg inode is on the page
100  number FSP_FIRST_INODE_PAGE_NO */
101 #define FSP_TRX_SYS_PAGE_NO 5
104 #define FSP_FIRST_RSEG_PAGE_NO 6
106 #define FSP_DICT_HDR_PAGE_NO 7
108 /*--------------------------------------*/
109 /* @} */
110 
111 #endif /* fsp0types_h */