Merge lp:~sergei.glushchenko/percona-xtrabackup/2.2-xb-bug1093385 into lp:percona-xtrabackup/2.2

Proposed by Sergei Glushchenko
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 4946
Proposed branch: lp:~sergei.glushchenko/percona-xtrabackup/2.2-xb-bug1093385
Merge into: lp:percona-xtrabackup/2.2
Diff against target: 118 lines (+19/-12)
4 files modified
storage/innobase/xtrabackup/src/ds_tmpfile.c (+4/-1)
storage/innobase/xtrabackup/src/fil_cur.cc (+1/-1)
storage/innobase/xtrabackup/src/xbstream.c (+5/-1)
storage/innobase/xtrabackup/src/xtrabackup.cc (+9/-9)
To merge this branch: bzr merge lp:~sergei.glushchenko/percona-xtrabackup/2.2-xb-bug1093385
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+208192@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'storage/innobase/xtrabackup/src/ds_tmpfile.c'
--- storage/innobase/xtrabackup/src/ds_tmpfile.c 2013-11-26 10:44:44 +0000
+++ storage/innobase/xtrabackup/src/ds_tmpfile.c 2014-02-25 17:10:41 +0000
@@ -179,6 +179,7 @@
179 void *buf = NULL;179 void *buf = NULL;
180 const size_t buf_size = 1024 * 1024;180 const size_t buf_size = 1024 * 1024;
181 size_t bytes;181 size_t bytes;
182 size_t offset;
182183
183 pipe_ctxt = ctxt->pipe_ctxt;184 pipe_ctxt = ctxt->pipe_ctxt;
184 xb_a(pipe_ctxt != NULL);185 xb_a(pipe_ctxt != NULL);
@@ -217,9 +218,11 @@
217 tmp_file->file->path, my_errno);218 tmp_file->file->path, my_errno);
218 exit(EXIT_FAILURE);219 exit(EXIT_FAILURE);
219 }220 }
221 offset = 0;
220 while ((bytes = my_read(tmp_file->fd, buf, buf_size,222 while ((bytes = my_read(tmp_file->fd, buf, buf_size,
221 MYF(MY_WME))) > 0) {223 MYF(MY_WME))) > 0) {
222 posix_fadvise(tmp_file->fd, 0, 0, POSIX_FADV_DONTNEED);224 posix_fadvise(tmp_file->fd, offset, buf_size, POSIX_FADV_DONTNEED);
225 offset += buf_size;
223 if (ds_write(dst_file, buf, bytes)) {226 if (ds_write(dst_file, buf, bytes)) {
224 msg("error: cannot write to stream for '%s'.\n",227 msg("error: cannot write to stream for '%s'.\n",
225 tmp_file->orig_path);228 tmp_file->orig_path);
226229
=== modified file 'storage/innobase/xtrabackup/src/fil_cur.cc'
--- storage/innobase/xtrabackup/src/fil_cur.cc 2013-11-26 10:44:44 +0000
+++ storage/innobase/xtrabackup/src/fil_cur.cc 2014-02-25 17:10:41 +0000
@@ -357,7 +357,7 @@
357 cursor->buf_npages++;357 cursor->buf_npages++;
358 }358 }
359359
360 posix_fadvise(cursor->file, 0, 0, POSIX_FADV_DONTNEED);360 posix_fadvise(cursor->file, offset, to_read, POSIX_FADV_DONTNEED);
361361
362 return(ret);362 return(ret);
363}363}
364364
=== modified file 'storage/innobase/xtrabackup/src/xbstream.c'
--- storage/innobase/xtrabackup/src/xbstream.c 2013-11-26 10:44:44 +0000
+++ storage/innobase/xtrabackup/src/xbstream.c 2014-02-25 17:10:41 +0000
@@ -209,8 +209,10 @@
209{209{
210 uchar buf[XBSTREAM_BUFFER_SIZE];210 uchar buf[XBSTREAM_BUFFER_SIZE];
211 size_t bytes;211 size_t bytes;
212 size_t offset;
212213
213 posix_fadvise(file, 0, 0, POSIX_FADV_SEQUENTIAL);214 posix_fadvise(file, 0, 0, POSIX_FADV_SEQUENTIAL);
215 offset = my_tell(file, MYF(MY_WME));
214216
215 while ((bytes = my_read(file, buf, XBSTREAM_BUFFER_SIZE,217 while ((bytes = my_read(file, buf, XBSTREAM_BUFFER_SIZE,
216 MYF(MY_WME))) > 0) {218 MYF(MY_WME))) > 0) {
@@ -219,7 +221,9 @@
219 my_progname);221 my_progname);
220 return 1;222 return 1;
221 }223 }
222 posix_fadvise(file, 0, 0, POSIX_FADV_DONTNEED);224 posix_fadvise(file, offset, XBSTREAM_BUFFER_SIZE,
225 POSIX_FADV_DONTNEED);
226 offset += XBSTREAM_BUFFER_SIZE;
223227
224 }228 }
225229
226230
=== modified file 'storage/innobase/xtrabackup/src/xtrabackup.cc'
--- storage/innobase/xtrabackup/src/xtrabackup.cc 2014-01-17 12:20:16 +0000
+++ storage/innobase/xtrabackup/src/xtrabackup.cc 2014-02-25 17:10:41 +0000
@@ -4347,6 +4347,8 @@
4347 byte* incremental_buffer_base = NULL;4347 byte* incremental_buffer_base = NULL;
4348 byte* incremental_buffer;4348 byte* incremental_buffer;
43494349
4350 size_t offset;
4351
4350 ut_a(xtrabackup_incremental);4352 ut_a(xtrabackup_incremental);
43514353
4352 if (dbname) {4354 if (dbname) {
@@ -4399,7 +4401,6 @@
4399 }4401 }
44004402
4401 posix_fadvise(src_file, 0, 0, POSIX_FADV_SEQUENTIAL);4403 posix_fadvise(src_file, 0, 0, POSIX_FADV_SEQUENTIAL);
4402 posix_fadvise(src_file, 0, 0, POSIX_FADV_DONTNEED);
44034404
4404 os_file_set_nocache(src_file, src_path, "OPEN");4405 os_file_set_nocache(src_file, src_path, "OPEN");
44054406
@@ -4430,11 +4431,10 @@
44304431
4431 /* read to buffer */4432 /* read to buffer */
4432 /* first block of block cluster */4433 /* first block of block cluster */
4434 offset = ((incremental_buffers * (page_size / 4))
4435 << page_size_shift);
4433 success = os_file_read(src_file, incremental_buffer,4436 success = os_file_read(src_file, incremental_buffer,
4434 ((incremental_buffers4437 offset, page_size);
4435 * (page_size / 4))
4436 << page_size_shift),
4437 page_size);
4438 if (!success) {4438 if (!success) {
4439 goto error;4439 goto error;
4440 }4440 }
@@ -4463,14 +4463,14 @@
44634463
4464 /* read whole of the cluster */4464 /* read whole of the cluster */
4465 success = os_file_read(src_file, incremental_buffer,4465 success = os_file_read(src_file, incremental_buffer,
4466 ((incremental_buffers4466 offset, page_in_buffer * page_size);
4467 * (page_size / 4))
4468 << page_size_shift),
4469 page_in_buffer * page_size);
4470 if (!success) {4467 if (!success) {
4471 goto error;4468 goto error;
4472 }4469 }
44734470
4471 posix_fadvise(src_file, offset, page_in_buffer * page_size,
4472 POSIX_FADV_DONTNEED);
4473
4474 for (page_in_buffer = 1; page_in_buffer < page_size / 4;4474 for (page_in_buffer = 1; page_in_buffer < page_size / 4;
4475 page_in_buffer++) {4475 page_in_buffer++) {
4476 ulint offset_on_page;4476 ulint offset_on_page;

Subscribers

People subscribed via source and target branches