Merge lp:~laurynas-biveinis/percona-server/bug1262500-5.5 into lp:percona-server/5.5

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 612
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1262500-5.5
Merge into: lp:percona-server/5.5
Diff against target: 36 lines (+7/-5)
1 file modified
Percona-Server/storage/innobase/os/os0file.c (+7/-5)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug1262500-5.5
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Registry Administrators Pending
Review via email: mp+199701@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :

The patch looks correct, but see bug #1263087.

review: Approve

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.c'
--- Percona-Server/storage/innobase/os/os0file.c 2013-08-21 07:14:34 +0000
+++ Percona-Server/storage/innobase/os/os0file.c 2013-12-19 18:53:56 +0000
@@ -2365,12 +2365,13 @@
2365 os_n_pending_reads++;2365 os_n_pending_reads++;
2366 os_mutex_exit(os_file_count_mutex);2366 os_mutex_exit(os_file_count_mutex);
23672367
2368 /* Handle signal interruptions correctly */2368 /* Handle partial reads and signal interruptions correctly */
2369 for (n_bytes = 0; n_bytes < (ssize_t) n; ) {2369 for (n_bytes = 0; n_bytes < (ssize_t) n; ) {
2370 n_read = pread(file, buf, (ssize_t)n, offs);2370 n_read = pread(file, buf, (ssize_t)n - n_bytes, offs);
2371 if (n_read > 0) {2371 if (n_read > 0) {
2372 n_bytes += n_read;2372 n_bytes += n_read;
2373 offs += n_read;2373 offs += n_read;
2374 buf = (char *)buf + n_read;
2374 } else if (n_read == -1 && errno == EINTR) {2375 } else if (n_read == -1 && errno == EINTR) {
2375 continue;2376 continue;
2376 } else {2377 } else {
@@ -2493,12 +2494,13 @@
2493 os_n_pending_writes++;2494 os_n_pending_writes++;
2494 os_mutex_exit(os_file_count_mutex);2495 os_mutex_exit(os_file_count_mutex);
24952496
2496 /* Handle signal interruptions correctly */2497 /* Handle partial writes and signal interruptions correctly */
2497 for (ret = 0; ret < (ssize_t) n; ) {2498 for (ret = 0; ret < (ssize_t) n; ) {
2498 n_written = pwrite(file, buf, (ssize_t)n, offs);2499 n_written = pwrite(file, buf, (ssize_t)n - ret, offs);
2499 if (n_written > 0) {2500 if (n_written >= 0) {
2500 ret += n_written;2501 ret += n_written;
2501 offs += n_written;2502 offs += n_written;
2503 buf = (char *)buf + n_written;
2502 } else if (n_written == -1 && errno == EINTR) {2504 } else if (n_written == -1 && errno == EINTR) {
2503 continue;2505 continue;
2504 } else {2506 } else {

Subscribers

People subscribed via source and target branches