From a5e236db54d04c721d2c41fa6e54c8a2007e38f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Thu, 28 Nov 2013 11:34:43 +0200 Subject: [PATCH] Add additional srv_use_fallocate guard for completing the IO with read. --- storage/xtradb/fil/fil0fil.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/storage/xtradb/fil/fil0fil.c b/storage/xtradb/fil/fil0fil.c index c62c851bb7d..19e656dfd92 100644 --- a/storage/xtradb/fil/fil0fil.c +++ b/storage/xtradb/fil/fil0fil.c @@ -5034,7 +5034,11 @@ complete_io: dispatched read operation is enough here. Without this there will be assertion at shutdown indicating that all IO is not completed. */ - fil_node_complete_io(node, fil_system, OS_FILE_READ); + if (srv_use_posix_fallocate) { + fil_node_complete_io(node, fil_system, OS_FILE_READ); + } else { + fil_node_complete_io(node, fil_system, OS_FILE_WRITE); + } #else fil_node_complete_io(node, fil_system, OS_FILE_WRITE); #endif