494
495
buf_page_set_io_fix(&block->page, io_fix);
498
/*********************************************************************//**
499
Makes a block sticky. A sticky block implies that even after we release
500
the buf_pool->mutex and the block->mutex:
501
* it cannot be removed from the flush_list
502
* the block descriptor cannot be relocated
503
* it cannot be removed from the LRU list
505
* the block can still change its position in the LRU list
506
* the next and previous pointers can change. */
511
buf_page_t* bpage) /*!< in/out: control block */
514
buf_pool_t* buf_pool = buf_pool_from_bpage(bpage);
515
ut_ad(mutex_own(&buf_pool->LRU_list_mutex));
517
ut_ad(mutex_own(buf_page_get_mutex(bpage)));
518
ut_ad(buf_page_get_io_fix(bpage) == BUF_IO_NONE);
520
bpage->io_fix = BUF_IO_PIN;
523
/*********************************************************************//**
524
Removes stickiness of a block. */
527
buf_page_unset_sticky(
528
/*==================*/
529
buf_page_t* bpage) /*!< in/out: control block */
532
buf_pool_t* buf_pool = buf_pool_from_bpage(bpage);
533
ut_ad(mutex_own(&buf_pool->LRU_list_mutex));
535
ut_ad(mutex_own(buf_page_get_mutex(bpage)));
536
ut_ad(buf_page_get_io_fix(bpage) == BUF_IO_PIN);
538
bpage->io_fix = BUF_IO_NONE;
497
541
/********************************************************************//**
498
542
Determine if a buffer block can be relocated in memory. The block
499
543
can be dirty, but it must not be I/O-fixed or bufferfixed. */