15
15
#include "fut0lst.h"
16
16
#include "ut0byte.h"
17
17
#include "page0types.h"
19
/* If records are inserted in order, there are the following
20
flags to tell this (their type is made byte for the compiler
21
to warn if direction and hint parameters are switched in
22
fseg_alloc_free_page): */
23
#define FSP_UP ((byte)111) /* alphabetically upwards */
24
#define FSP_DOWN ((byte)112) /* alphabetically downwards */
25
#define FSP_NO_DIR ((byte)113) /* no order */
27
/* File space extent size in pages */
28
#define FSP_EXTENT_SIZE 64
30
/* On a page of any file segment, data may be put starting from this offset: */
31
#define FSEG_PAGE_DATA FIL_PAGE_DATA
33
/* File segment header which points to the inode describing the file segment */
34
typedef byte fseg_header_t;
36
#define FSEG_HDR_SPACE 0 /* space id of the inode */
37
#define FSEG_HDR_PAGE_NO 4 /* page number of the inode */
38
#define FSEG_HDR_OFFSET 8 /* byte offset of the inode */
40
#define FSEG_HEADER_SIZE 10
18
#include "fsp0types.h"
42
20
/**************************************************************************
43
21
Initializes the file space system. */
350
328
fseg_header_t* header, /* in: segment header */
351
329
mtr_t* mtr); /* in: mtr */
353
/* Flags for fsp_reserve_free_extents */
354
#define FSP_NORMAL 1000000
355
#define FSP_UNDO 2000000
356
#define FSP_CLEANING 3000000
358
/* Number of pages described in a single descriptor page: currently each page
359
description takes less than 1 byte; a descriptor page is repeated every
360
this many file pages */
361
#define XDES_DESCRIBED_PER_PAGE UNIV_PAGE_SIZE
363
/* The space low address page map */
364
/*--------------------------------------*/
365
/* The following two pages are repeated
366
every XDES_DESCRIBED_PER_PAGE pages in
368
#define FSP_XDES_OFFSET 0 /* extent descriptor */
369
#define FSP_IBUF_BITMAP_OFFSET 1 /* insert buffer bitmap */
370
/* The ibuf bitmap pages are the ones whose
371
page number is the number above plus a
372
multiple of XDES_DESCRIBED_PER_PAGE */
374
#define FSP_FIRST_INODE_PAGE_NO 2 /* in every tablespace */
375
/* The following pages exist
376
in the system tablespace (space 0). */
377
#define FSP_IBUF_HEADER_PAGE_NO 3 /* in tablespace 0 */
378
#define FSP_IBUF_TREE_ROOT_PAGE_NO 4 /* in tablespace 0 */
379
/* The ibuf tree root page number in
380
tablespace 0; its fseg inode is on the page
381
number FSP_FIRST_INODE_PAGE_NO */
382
#define FSP_TRX_SYS_PAGE_NO 5 /* in tablespace 0 */
383
#define FSP_FIRST_RSEG_PAGE_NO 6 /* in tablespace 0 */
384
#define FSP_DICT_HDR_PAGE_NO 7 /* in tablespace 0 */
385
/*--------------------------------------*/
387
331
#ifndef UNIV_NONINL
388
332
#include "fsp0fsp.ic"