innodb segment space management

来源:互联网 发布:js onclick 传递参数 编辑:程序博客网 时间:2024/06/04 18:24

inode

/*-------------------------------------*/

#define FSEG_ID0 

/* 8 bytes of segment id: if this is 0, it means that the header is unused */

#define  FSEG_NOT_FULL_N_USED8 

/* number of used segment pages in the FSEG_NOT_FULL list */

#define FSEG_FREE12 

/* list of free extents of this segment */

#define FSEG_NOT_FULL(12 + FLST_BASE_NODE_SIZE)    

/* list of partially free extents */

#define FSEG_FULL(12 + 2 * FLST_BASE_NODE_SIZE) 

/* list of full extents */

#define FSEG_MAGIC_N(12 + 3 * FLST_BASE_NODE_SIZE) 

/* magic number used in debugging */

#define FSEG_FRAG_ARR(16 + 3 * FLST_BASE_NODE_SIZE)

 /* array of individual pages belonging to this segment in fsp fragment extent lists */

#define FSEG_FRAG_ARR_N_SLOTS(FSP_EXTENT_SIZE / 2)

 /* number of slots in the array for the fragment pages */

#define FSEG_FRAG_SLOT_SIZE4 

/* a fragment page slot contains its page number within space, FIL_NULL means that the slot is not in use */


/*SPACE HEADER
============
File space header data structure: this data structure is contained in the first page of a space. The space for this header is reserved in every extent
descriptor page, but used only in the first. */

/*-------------------------------------*/

#define FSP_SPACE_ID 0

/* space id */

#define FSP_NOT_USED 4

/* this field contained a value up to which we know that the modifications in the database have been flushed to the filespace;  not used now */

#define FSP_SIZE8 

/* Current size of the space in pages */

#define FSP_FREE_LIMIT12 

/* Minimum page number for which the free list has not been initialized: the pages >= this limit are, by definition, free; notethat in a single-tabletablespace where size < 64 pages, this number is 64, i.e., we have initialized the space about the firstextent, but have not physically allocted those pagesto the file */

#define FSP_SPACE_FLAGS16 

/* fsp_space_t.flags, similar todict_table_t::flags */

#define FSP_FRAG_N_USED20 

/* number of used pages in the FSP_FREE_FRAG list */

#define FSP_FREE24 

/* list of free extents */

#define FSP_FREE_FRAG(24 + FLST_BASE_NODE_SIZE) 

/* list of partially free extents not belonging to any segment */

#define FSP_FULL_FRAG(24 + 2 * FLST_BASE_NODE_SIZE) 

/* list of full extents not belonging to any segment */

#define FSP_SEG_ID (24 + 3 * FLST_BASE_NODE_SIZE)

/* 8 bytes which give the first unused segment id */

#define FSP_SEG_INODES_FULL (32 + 3 * FLST_BASE_NODE_SIZE) 

/* list of pages containing segment headers, where all the segment inode slots are reserved */

#define FSP_SEG_INODES_FREE (32 + 4 * FLST_BASE_NODE_SIZE) 

/* list of pages containing segment headers, where not all the segment header slots are reserved*/

/*-------------------------------------*/

原创粉丝点击