Commit d66ffab4 authored by marko's avatar marko

branches/zip: Add comments related to Issue #155.

buf_flush_try_page(): Note why it is safe to access bpage without
holding buf_pool_mutex or block_mutex.
parent 18a59b38
......@@ -796,6 +796,12 @@ buf_flush_try_page(
mutex_exit(block_mutex);
buf_pool_mutex_exit();
/* Even though bpage is not protected by any mutex at
this point, it is safe to access bpage, because it is
io_fixed and oldest_modification != 0. Thus, it
cannot be relocated in the buffer pool or removed from
flush_list or LRU_list. */
if (!is_s_latched) {
buf_flush_buffered_writes();
......@@ -843,6 +849,11 @@ buf_flush_try_page(
ut_error;
}
/* Even though bpage is not protected by any mutex at this
point, it is safe to access bpage, because it is io_fixed and
oldest_modification != 0. Thus, it cannot be relocated in the
buffer pool or removed from flush_list or LRU_list. */
#ifdef UNIV_DEBUG
if (buf_debug_prints) {
fprintf(stderr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment