@@ -42,8 +42,6 @@ Created 11/29/1995 Heikki Tuuri
42
42
#include " fsp0types.h"
43
43
#include " log.h"
44
44
45
- typedef uint32_t page_no_t ;
46
-
47
45
/* * Returns the first extent descriptor for a segment.
48
46
We think of the extent lists of the segment catenated in the order
49
47
FSEG_FULL -> FSEG_NOT_FULL -> FSEG_FREE.
@@ -332,7 +330,7 @@ xdes_t*
332
330
xdes_get_descriptor_with_space_hdr(
333
331
buf_block_t * header,
334
332
const fil_space_t * space,
335
- page_no_t offset,
333
+ uint32_t offset,
336
334
mtr_t * mtr,
337
335
dberr_t * err = nullptr ,
338
336
buf_block_t ** desc_block = nullptr ,
@@ -396,7 +394,7 @@ try to add new extents to the space free list
396
394
@param[out] err error code
397
395
@param[out] xdes extent descriptor page
398
396
@return the extent descriptor */
399
- static xdes_t *xdes_get_descriptor(const fil_space_t *space, page_no_t offset,
397
+ static xdes_t *xdes_get_descriptor(const fil_space_t *space, uint32_t offset,
400
398
mtr_t *mtr, dberr_t *err= nullptr ,
401
399
buf_block_t **xdes= nullptr )
402
400
{
@@ -842,8 +840,7 @@ fsp_fill_free_list(
842
840
if (i)
843
841
{
844
842
buf_block_t *f= buf_LRU_get_free_block (false );
845
- buf_block_t *block= buf_page_create (space, static_cast <uint32_t >(i),
846
- zip_size, mtr, f);
843
+ buf_block_t *block= buf_page_create (space, i, zip_size, mtr, f);
847
844
if (UNIV_UNLIKELY (block != f))
848
845
buf_pool.free_block (f);
849
846
fsp_init_file_page (space, block, mtr);
@@ -855,9 +852,7 @@ fsp_fill_free_list(
855
852
{
856
853
buf_block_t *f= buf_LRU_get_free_block (false );
857
854
buf_block_t *block=
858
- buf_page_create (space,
859
- static_cast <uint32_t >(i + FSP_IBUF_BITMAP_OFFSET),
860
- zip_size, mtr, f);
855
+ buf_page_create (space, i + FSP_IBUF_BITMAP_OFFSET, zip_size, mtr, f);
861
856
if (UNIV_UNLIKELY (block != f))
862
857
buf_pool.free_block (f);
863
858
fsp_init_file_page (space, block, mtr);
@@ -1028,13 +1023,11 @@ fsp_alloc_from_free_frag(buf_block_t *header, buf_block_t *xdes, xdes_t *descr,
1028
1023
@param[in] offset page number of the allocated page
1029
1024
@param[in,out] mtr mini-transaction
1030
1025
@return block, initialized */
1031
- static
1032
- buf_block_t *
1033
- fsp_page_create (fil_space_t *space, page_no_t offset, mtr_t *mtr)
1026
+ static buf_block_t * fsp_page_create (fil_space_t *space, uint32_t offset,
1027
+ mtr_t *mtr)
1034
1028
{
1035
- buf_block_t *free_block= buf_LRU_get_free_block (false );
1036
- buf_block_t *block= buf_page_create (space, static_cast <uint32_t >(offset),
1037
- space->zip_size (), mtr, free_block);
1029
+ buf_block_t *free_block= buf_LRU_get_free_block (false ),
1030
+ *block= buf_page_create (space, offset, space->zip_size (), mtr, free_block);
1038
1031
if (UNIV_UNLIKELY (block != free_block))
1039
1032
buf_pool.free_block (free_block);
1040
1033
fsp_init_file_page (space, block, mtr);
@@ -1154,7 +1147,7 @@ MY_ATTRIBUTE((nonnull, warn_unused_result))
1154
1147
@param[in] offset page number in the extent
1155
1148
@param[in,out] mtr mini-transaction
1156
1149
@return error code */
1157
- static dberr_t fsp_free_extent(fil_space_t * space, page_no_t offset,
1150
+ static dberr_t fsp_free_extent(fil_space_t * space, uint32_t offset,
1158
1151
mtr_t * mtr)
1159
1152
{
1160
1153
ut_ad (space->is_owner ());
@@ -1191,7 +1184,7 @@ The page is marked as free and clean.
1191
1184
@param[in] offset page number
1192
1185
@param[in,out] mtr mini-transaction
1193
1186
@return error code */
1194
- static dberr_t fsp_free_page(fil_space_t *space, page_no_t offset, mtr_t *mtr)
1187
+ static dberr_t fsp_free_page(fil_space_t *space, uint32_t offset, mtr_t *mtr)
1195
1188
{
1196
1189
xdes_t * descr;
1197
1190
ulint frag_n_used;
@@ -2467,7 +2460,7 @@ fseg_free_page_low(
2467
2460
fseg_inode_t * seg_inode,
2468
2461
buf_block_t * iblock,
2469
2462
fil_space_t * space,
2470
- page_no_t offset,
2463
+ uint32_t offset,
2471
2464
mtr_t * mtr
2472
2465
#ifdef BTR_CUR_HASH_ADAPT
2473
2466
,bool ahi=false
@@ -2833,7 +2826,7 @@ fseg_free_step(
2833
2826
return true ;
2834
2827
}
2835
2828
2836
- page_no_t page_no = fseg_get_nth_frag_page_no (inode, n);
2829
+ uint32_t page_no = fseg_get_nth_frag_page_no (inode, n);
2837
2830
2838
2831
if (fseg_free_page_low (inode, iblock, space, page_no, mtr
2839
2832
#ifdef BTR_CUR_HASH_ADAPT
0 commit comments