464
465
buf_page_set_io_fix(&block->page, io_fix);
468
/*********************************************************************//**
469
Makes a block sticky. A sticky block implies that even after we release
470
the buf_pool->mutex and the block->mutex:
471
* it cannot be removed from the flush_list
472
* the block descriptor cannot be relocated
473
* it cannot be removed from the LRU list
475
* the block can still change its position in the LRU list
476
* the next and previous pointers can change. */
481
buf_page_t* bpage) /*!< in/out: control block */
484
buf_pool_t* buf_pool = buf_pool_from_bpage(bpage);
485
ut_ad(buf_pool_mutex_own(buf_pool));
487
ut_ad(mutex_own(buf_page_get_mutex(bpage)));
488
ut_ad(buf_page_get_io_fix(bpage) == BUF_IO_NONE);
490
bpage->io_fix = BUF_IO_PIN;
493
/*********************************************************************//**
494
Removes stickiness of a block. */
497
buf_page_unset_sticky(
498
/*==================*/
499
buf_page_t* bpage) /*!< in/out: control block */
502
buf_pool_t* buf_pool = buf_pool_from_bpage(bpage);
503
ut_ad(buf_pool_mutex_own(buf_pool));
505
ut_ad(mutex_own(buf_page_get_mutex(bpage)));
506
ut_ad(buf_page_get_io_fix(bpage) == BUF_IO_PIN);
508
bpage->io_fix = BUF_IO_NONE;
467
511
/********************************************************************//**
468
512
Determine if a buffer block can be relocated in memory. The block
469
513
can be dirty, but it must not be I/O-fixed or bufferfixed. */