mariadb/storage/innobase
Marko Mäkelä b82c602db5 MDEV-12602 InnoDB: Failing assertion: space->n_pending_ops == 0
This fixes a regression caused by MDEV-12428.
When we introduced a variant of fil_space_acquire() that could
increment space->n_pending_ops after space->stop_new_ops was set,
the logic of fil_check_pending_operations() was broken.

fil_space_t::n_pending_ios: A new field to track read or write
access from the buffer pool routines immediately before a block
write or after a block read in the file system.

fil_space_acquire_for_io(), fil_space_release_for_io(): Similar
to fil_space_acquire_silent() and fil_space_release(), but
modify fil_space_t::n_pending_ios instead of fil_space_t::n_pending_ops.

Adjust a number of places accordingly, and remove some redundant
tablespace lookups.

The following parts of this fix differ from the 10.2 version of this fix:

buf_page_get_corrupt(): Add a tablespace parameter.

In 10.2, we already had a two-phase process of freeing fil_space objects
(first, fil_space_detach(), then release fil_system->mutex, and finally
free the fil_space and fil_node objects).

fil_space_free_and_mutex_exit(): Renamed from fil_space_free().
Detach the tablespace from the fil_system cache, release the
fil_system->mutex, and then wait for space->n_pending_ios to reach 0,
to avoid accessing freed data in a concurrent thread.
During the wait, future calls to fil_space_acquire_for_io() will
not find this tablespace, and the count can only be decremented to 0,
at which point it is safe to free the objects.

fil_node_free_part1(), fil_node_free_part2(): Refactored from
fil_node_free().
2017-04-28 14:12:52 +03:00
..
api MDEV-12253: Buffer pool blocks are accessed after they have been freed 2017-04-26 15:19:16 +03:00
btr MDEV-12253: Buffer pool blocks are accessed after they have been freed 2017-04-26 15:19:16 +03:00
buf MDEV-12602 InnoDB: Failing assertion: space->n_pending_ops == 0 2017-04-28 14:12:52 +03:00
data 5.6.31 2016-06-21 14:21:03 +02:00
dict MDEV-12253: Buffer pool blocks are accessed after they have been freed 2017-04-26 15:19:16 +03:00
dyn Merge branch '5.5' into 10.0 2017-03-03 01:37:54 +02:00
eval move to storage/innobase 2015-05-04 19:17:21 +02:00
fil MDEV-12602 InnoDB: Failing assertion: space->n_pending_ops == 0 2017-04-28 14:12:52 +03:00
fsp MDEV-11738: Mariadb uses 100% of several of my 8 cpus doing nothing 2017-03-14 16:23:10 +02:00
fts MDEV-11738: Mariadb uses 100% of several of my 8 cpus doing nothing 2017-03-14 16:23:10 +02:00
fut Part 1 of MDEV-8139 Fix scrubbing tests 2017-01-04 18:21:42 +02:00
ha move to storage/innobase 2015-05-04 19:17:21 +02:00
handler MDEV-12253: Buffer pool blocks are accessed after they have been freed 2017-04-26 15:19:16 +03:00
ibuf MDEV-11738: Mariadb uses 100% of several of my 8 cpus doing nothing 2017-03-14 16:23:10 +02:00
include MDEV-12602 InnoDB: Failing assertion: space->n_pending_ops == 0 2017-04-28 14:12:52 +03:00
lock MW-28, codership/mysql-wsrep#28 Fix sync_thread_levels debug assert 2017-04-06 15:41:54 +05:30
log MDEV-11663 Create services for functionality used by plugins 2017-04-27 19:12:38 +02:00
mach 5.6.35 2017-01-07 14:24:42 +02:00
mem 5.6.31 2016-06-21 14:21:03 +02:00
mtr Merge 10.0 into 10.1 2017-03-09 08:53:08 +02:00
mysql-test/storage_engine Follow-up for MDEV-8675 and MDEV-8676 2015-09-14 03:12:54 +03:00
os Merge 10.0 into 10.1 2017-04-21 17:41:40 +03:00
page Merge 10.0 into 10.1 2017-03-09 08:53:08 +02:00
pars MDEV-11738: Mariadb uses 100% of several of my 8 cpus doing nothing 2017-03-14 16:23:10 +02:00
que 5.6.24 2015-05-04 22:13:46 +02:00
read move to storage/innobase 2015-05-04 19:17:21 +02:00
rem Fix gcc 6.3.x compiler warnings. 2017-02-16 12:02:31 +02:00
row MDEV-12253: Buffer pool blocks are accessed after they have been freed 2017-04-26 15:19:16 +03:00
srv MDEV-12253: Buffer pool blocks are accessed after they have been freed 2017-04-26 15:19:16 +03:00
sync Merge 10.0 into 10.1 2017-04-21 12:46:12 +03:00
trx MDEV-12253: Buffer pool blocks are accessed after they have been freed 2017-04-26 15:19:16 +03:00
usr move to storage/innobase 2015-05-04 19:17:21 +02:00
ut MDEV-12253: Buffer pool blocks are accessed after they have been freed 2017-04-26 15:19:16 +03:00
CMakeLists.txt MDEV-12591 MariaDB embedded server refuses start with innodb_plugin 2017-04-27 19:12:45 +02:00
compile-innodb move to storage/innobase 2015-05-04 19:17:21 +02:00
COPYING.Google move to storage/innobase 2015-05-04 19:17:21 +02:00
COPYING.Percona move to storage/innobase 2015-05-04 19:17:21 +02:00
Doxyfile move to storage/innobase 2015-05-04 19:17:21 +02:00
ha_innodb.def move to storage/innobase 2015-05-04 19:17:21 +02:00
plugin_exports