Merge lp:~laurynas-biveinis/percona-server/bug1286114-5.6 into lp:percona-server/5.6

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Sergei Glushchenko
Approved revision: no longer in the source branch.
Merged at revision: 564
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1286114-5.6
Merge into: lp:percona-server/5.6
Diff against target: 28 lines (+15/-3)
1 file modified
storage/innobase/fil/fil0fil.cc (+15/-3)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug1286114-5.6
Reviewer Review Type Date Requested Status
Sergei Glushchenko (community) g2 Approve
Review via email: mp+209622@code.launchpad.net

Description of the change

Merge bug 1286114 fix from 5.5.

http://jenkins.percona.com/job/percona-server-5.6-param/538/

Also run MTR locally with enabled srv_use_fallocate.

To post a comment you must log in.
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Approve

review: Approve (g2)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'storage/innobase/fil/fil0fil.cc'
--- storage/innobase/fil/fil0fil.cc 2014-03-04 12:59:39 +0000
+++ storage/innobase/fil/fil0fil.cc 2014-03-06 09:29:22 +0000
@@ -5119,9 +5119,21 @@
5119#ifdef HAVE_POSIX_FALLOCATE5119#ifdef HAVE_POSIX_FALLOCATE
5120 if (srv_use_posix_fallocate) {5120 if (srv_use_posix_fallocate) {
51215121
5122 success = os_file_set_size(node->name, node->handle,5122 os_offset_t start_offset = file_start_page_no * page_size;
5123 (size_after_extend5123 os_offset_t end_offset
5124 - file_start_page_no) * page_size);5124 = (size_after_extend - file_start_page_no) * page_size;
5125
5126 success = (posix_fallocate(node->handle, start_offset,
5127 end_offset) == 0);
5128 if (!success)
5129 {
5130 ib_logf(IB_LOG_LEVEL_ERROR,
5131 "preallocating file space for file \'%s\' "
5132 "failed. Current size " INT64PF
5133 ", len " INT64PF ", desired size " INT64PF
5134 "\n", node->name, start_offset, end_offset,
5135 start_offset + end_offset);
5136 }
5125 mutex_enter(&fil_system->mutex);5137 mutex_enter(&fil_system->mutex);
5126 if (success) {5138 if (success) {
5127 node->size += (size_after_extend - start_page_no);5139 node->size += (size_after_extend - start_page_no);

Subscribers

People subscribed via source and target branches