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

Proposed by Laurynas Biveinis
Status: Merged
Approved by: George Ormond Lorch III
Approved revision: no longer in the source branch.
Merged at revision: 525
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1263087-5.6
Merge into: lp:percona-server/5.6
Diff against target: 52 lines (+36/-0)
1 file modified
Percona-Server/storage/innobase/os/os0file.cc (+36/-0)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug1263087-5.6
Reviewer Review Type Date Requested Status
George Ormond Lorch III (community) g2 Approve
Alexey Kopytov Pending
Review via email: mp+199954@code.launchpad.net

Description of the change

Trivially merge bug 1263087 fix from 5.5 with a fprintf/ib_logf change.

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

To post a comment you must log in.
Revision history for this message
George Ormond Lorch III (gl-az) wrote :

Same comment/question as 5.5...

review: Approve (g2)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Percona-Server/storage/innobase/os/os0file.cc'
--- Percona-Server/storage/innobase/os/os0file.cc 2013-12-19 15:22:20 +0000
+++ Percona-Server/storage/innobase/os/os0file.cc 2013-12-23 14:22:39 +0000
@@ -5204,6 +5204,7 @@
5204 segment = os_aio_get_array_and_local_segment(&array, global_seg);5204 segment = os_aio_get_array_and_local_segment(&array, global_seg);
5205 n = array->n_slots / array->n_segments;5205 n = array->n_slots / array->n_segments;
52065206
5207 wait_for_event:
5207 /* Loop until we have found a completed request. */5208 /* Loop until we have found a completed request. */
5208 for (;;) {5209 for (;;) {
5209 ibool any_reserved = FALSE;5210 ibool any_reserved = FALSE;
@@ -5266,6 +5267,41 @@
5266 if (slot->ret == 0 && slot->n_bytes == (long) slot->len) {5267 if (slot->ret == 0 && slot->n_bytes == (long) slot->len) {
52675268
5268 ret = TRUE;5269 ret = TRUE;
5270 } else if ((slot->ret == 0) && (slot->n_bytes > 0)
5271 && (slot->n_bytes < (long) slot->len)) {
5272 /* Partial read or write scenario */
5273 int submit_ret;
5274 struct iocb* iocb;
5275 slot->buf = (byte*)slot->buf + slot->n_bytes;
5276 slot->offset = slot->offset + slot->n_bytes;
5277 slot->len = slot->len - slot->n_bytes;
5278 /* Resetting the bytes read/written */
5279 slot->n_bytes = 0;
5280 slot->io_already_done = FALSE;
5281 iocb = &(slot->control);
5282
5283 if (slot->type == OS_FILE_READ) {
5284 io_prep_pread(&slot->control, slot->file, slot->buf,
5285 slot->len, (off_t) slot->offset);
5286 } else {
5287 ut_a(slot->type == OS_FILE_WRITE);
5288 io_prep_pwrite(&slot->control, slot->file, slot->buf,
5289 slot->len, (off_t) slot->offset);
5290 }
5291 /* Resubmit an I/O request */
5292 submit_ret = io_submit(array->aio_ctx[segment], 1, &iocb);
5293 if (submit_ret < 0 ) {
5294 /* Aborting in case of submit failure */
5295 ib_logf(IB_LOG_LEVEL_FATAL,
5296 "Native Linux AIO interface. io_submit()"
5297 " call failed when resubmitting a partial"
5298 " I/O request on the file %s.",
5299 slot->name);
5300 } else {
5301 ret = FALSE;
5302 os_mutex_exit(array->mutex);
5303 goto wait_for_event;
5304 }
5269 } else {5305 } else {
5270 errno = -slot->ret;5306 errno = -slot->ret;
52715307

Subscribers

People subscribed via source and target branches