@@ -524,8 +524,6 @@ struct fil_space_t final
524524 another concurrent thread */
525525 static fil_space_t *drop (uint32_t id, pfs_os_file_t *detached_handle);
526526
527- void remove_file_low ();
528-
529527private:
530528 MY_ATTRIBUTE ((warn_unused_result))
531529 /* * Try to acquire a tablespace reference (increment referenced()).
@@ -1420,6 +1418,9 @@ struct fil_system_t
14201418#ifdef __linux__
14211419 /* * available block devices that reside on non-rotational storage */
14221420 std::vector<dev_t > ssd;
1421+
1422+ /* * External buffer pool file handler */
1423+ pfs_os_file_t ext_bp_file;
14231424public:
14241425 /* * @return whether a file system device is on non-rotational storage */
14251426 bool is_ssd (dev_t dev) const noexcept
@@ -1445,9 +1446,6 @@ struct fil_system_t
14451446 mysql_mutex_t mutex;
14461447 fil_space_t * sys_space; /* !< The innodb_system tablespace */
14471448 fil_space_t * temp_space; /* !< The innodb_temporary tablespace */
1448- private:
1449- pfs_os_file_t ext_bp_file;
1450-
14511449public:
14521450
14531451 /* * Extended buffer pool file path */
@@ -1457,14 +1455,6 @@ struct fil_system_t
14571455 not used. */
14581456 size_t ext_bp_size;
14591457
1460- /* * Create external buffer pool file.
1461- @return whether the creation failed */
1462- bool create_ext_file ();
1463- dberr_t ext_bp_io (buf_page_t &bpage, ext_buf_page_t &ext_buf_page,
1464- IORequest::Type io_request_type, buf_tmp_buffer_t *slot,
1465- size_t len, void *buf) noexcept ;
1466- bool ext_buf_pool_enabled () const { return ext_bp_size; }
1467- void ext_buf_pool_disable () { ext_bp_size= 0 ; }
14681458 /* * Map of fil_space_t::id to fil_space_t* */
14691459 hash_table_t spaces;
14701460
@@ -1522,6 +1512,33 @@ struct fil_system_t
15221512 potential space_id reuse */
15231513 bool space_id_reuse_warned;
15241514
1515+ /* * Create external buffer pool file.
1516+ @return whether the creation failed */
1517+ bool create_ext_file () noexcept ;
1518+
1519+ /* * External bufer pool os_aio() wrapper.
1520+ @param bpage buffer pool page for read/write
1521+ @param ext_buf_page external buffer pool page which will be freed on read
1522+ completion and replace bpage in buffer pool on write
1523+ completion
1524+ @param io_request_type IORequest::WRITE_ASYNC, IORequest::READ_SYNC or
1525+ IORequest::READ_ASYNC
1526+ @param slot memory to be used for encrypted or page_compressed
1527+ pages
1528+ @param len length to read/write
1529+ @param buf buffer
1530+ @retval DB_SUCCESS if request was queued successfully
1531+ @retval DB_IO_ERROR on I/O error */
1532+ dberr_t ext_bp_io (buf_page_t &bpage, ext_buf_page_t &ext_buf_page,
1533+ IORequest::Type io_request_type, buf_tmp_buffer_t *slot,
1534+ size_t len, void *buf) noexcept ;
1535+
1536+ /* * Returns if external buffer pool is enabled. */
1537+ bool ext_buf_pool_enabled () const { return ext_bp_size; }
1538+
1539+ /* * Disable external boffer pool */
1540+ void ext_buf_pool_disable () { ext_bp_size= 0 ; }
1541+
15251542 /* * Add the file to the end of opened spaces list in
15261543 fil_system.space_list, so that fil_space_t::try_to_close() should close
15271544 it as a last resort.
@@ -1858,7 +1875,12 @@ ulint fil_space_get_block_size(const fil_space_t* space, unsigned offset)
18581875bool fil_crypt_check (fil_space_crypt_t *crypt_data, const char *f_name)
18591876 noexcept ;
18601877
1878+ /* * Create temporary files in the given paramater path, and if
1879+ UNIV_PFS_IO defined, register the file descriptor with Performance Schema.
1880+ @param path location for creating temporary merge files, or NULL
1881+ @param label label for registration in Performance Schema if path == nullptr
1882+ @param prefix temporary file name prefix
1883+ @return File descriptor */
18611884pfs_os_file_t pfs_create_temp_file (const char *path, const char *label,
1862- const char *prefix, int mode);
1863-
1885+ const char *prefix);
18641886#endif /* UNIV_INNOCHECKSUM */
0 commit comments