Skip to content

Commit 338ed5c

Browse files
committed
MDEV-26195 fixup: Remove page_no_t
1 parent 1eb11da commit 338ed5c

File tree

1 file changed

+12
-19
lines changed

1 file changed

+12
-19
lines changed

storage/innobase/fsp/fsp0fsp.cc

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ Created 11/29/1995 Heikki Tuuri
4242
#include "fsp0types.h"
4343
#include "log.h"
4444

45-
typedef uint32_t page_no_t;
46-
4745
/** Returns the first extent descriptor for a segment.
4846
We think of the extent lists of the segment catenated in the order
4947
FSEG_FULL -> FSEG_NOT_FULL -> FSEG_FREE.
@@ -332,7 +330,7 @@ xdes_t*
332330
xdes_get_descriptor_with_space_hdr(
333331
buf_block_t* header,
334332
const fil_space_t* space,
335-
page_no_t offset,
333+
uint32_t offset,
336334
mtr_t* mtr,
337335
dberr_t* err = nullptr,
338336
buf_block_t** desc_block = nullptr,
@@ -396,7 +394,7 @@ try to add new extents to the space free list
396394
@param[out] err error code
397395
@param[out] xdes extent descriptor page
398396
@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,
400398
mtr_t *mtr, dberr_t *err= nullptr,
401399
buf_block_t **xdes= nullptr)
402400
{
@@ -842,8 +840,7 @@ fsp_fill_free_list(
842840
if (i)
843841
{
844842
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);
847844
if (UNIV_UNLIKELY(block != f))
848845
buf_pool.free_block(f);
849846
fsp_init_file_page(space, block, mtr);
@@ -855,9 +852,7 @@ fsp_fill_free_list(
855852
{
856853
buf_block_t *f= buf_LRU_get_free_block(false);
857854
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);
861856
if (UNIV_UNLIKELY(block != f))
862857
buf_pool.free_block(f);
863858
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,
10281023
@param[in] offset page number of the allocated page
10291024
@param[in,out] mtr mini-transaction
10301025
@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)
10341028
{
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);
10381031
if (UNIV_UNLIKELY(block != free_block))
10391032
buf_pool.free_block(free_block);
10401033
fsp_init_file_page(space, block, mtr);
@@ -1154,7 +1147,7 @@ MY_ATTRIBUTE((nonnull, warn_unused_result))
11541147
@param[in] offset page number in the extent
11551148
@param[in,out] mtr mini-transaction
11561149
@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,
11581151
mtr_t* mtr)
11591152
{
11601153
ut_ad(space->is_owner());
@@ -1191,7 +1184,7 @@ The page is marked as free and clean.
11911184
@param[in] offset page number
11921185
@param[in,out] mtr mini-transaction
11931186
@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)
11951188
{
11961189
xdes_t* descr;
11971190
ulint frag_n_used;
@@ -2467,7 +2460,7 @@ fseg_free_page_low(
24672460
fseg_inode_t* seg_inode,
24682461
buf_block_t* iblock,
24692462
fil_space_t* space,
2470-
page_no_t offset,
2463+
uint32_t offset,
24712464
mtr_t* mtr
24722465
#ifdef BTR_CUR_HASH_ADAPT
24732466
,bool ahi=false
@@ -2833,7 +2826,7 @@ fseg_free_step(
28332826
return true;
28342827
}
28352828

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);
28372830

28382831
if (fseg_free_page_low(inode, iblock, space, page_no, mtr
28392832
#ifdef BTR_CUR_HASH_ADAPT

0 commit comments

Comments
 (0)