函数fsp_seg_inode_page_get_nth_inode

#define FSEG_ARR_OFFSET (FSEG_PAGE_DATA + FLST_NODE_SIZE)

#define FSEG_PAGE_DATA FIL_PAGE_DATA

#define FIL_PAGE_DATA 38

#define FLST_NODE_SIZE (2 * FIL_ADDR_SIZE)

#define FIL_ADDR_SIZE 6

函数fsp_seg_inode_page_get_nth_inode

#define FSEG_INODE_SIZE \
(16 + 3 * FLST_BASE_NODE_SIZE \
+ FSEG_FRAG_ARR_N_SLOTS * FSEG_FRAG_SLOT_SIZE)

(16+3*16)+32*4=192

#define FLST_BASE_NODE_SIZE (4 + 2 * FIL_ADDR_SIZE)

#define FIL_ADDR_SIZE 6

#define FSEG_FRAG_ARR_N_SLOTS (FSP_EXTENT_SIZE / 2)

#define FSP_EXTENT_SIZE (1 << (20 - UNIV_PAGE_SIZE_SHIFT))

#define UNIV_PAGE_SIZE_SHIFT 14

#define FSEG_FRAG_SLOT_SIZE 4

/**********************************************************************//**
Returns the nth inode slot on an inode page.
@return    segment inode */
UNIV_INLINE
fseg_inode_t*
fsp_seg_inode_page_get_nth_inode(
/*=============================*/
    page_t*    page,    /*!< in: segment inode page */
    ulint    i,    /*!< in: inode index on page */
    ulint    zip_size __attribute__((unused)),
            /*!< in: compressed page size, or 0 */
    mtr_t*    mtr __attribute__((unused)))
            /*!< in: mini-transaction handle */
{
    ut_ad(i < FSP_SEG_INODES_PER_PAGE(zip_size));
    ut_ad(mtr_memo_contains_page(mtr, page, MTR_MEMO_PAGE_X_FIX));

    return(page + FSEG_ARR_OFFSET + FSEG_INODE_SIZE * i);
}
上一篇:g4e基础篇#3 Git安装与配置


下一篇:Keepalived + HAProxy 搭建【第二篇】Keepalived 安装与配置