mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
ping pong: fix logic for mmap reads vs. preads
Michael (This used to be ctdb commit 0c88fa41bc3c629052bc137ed30c473ed10522fd)
This commit is contained in:
parent
179d911826
commit
60bfafbf10
@ -115,7 +115,7 @@ static void ping_pong(int fd, int num_locks)
|
|||||||
unsigned char c;
|
unsigned char c;
|
||||||
if (use_mmap) {
|
if (use_mmap) {
|
||||||
c = p[i];
|
c = p[i];
|
||||||
} if (pread(fd, &c, 1, i) != 1) {
|
} else if (pread(fd, &c, 1, i) != 1) {
|
||||||
printf("read failed at %d\n", i);
|
printf("read failed at %d\n", i);
|
||||||
}
|
}
|
||||||
incr = c - val[i];
|
incr = c - val[i];
|
||||||
|
Loading…
Reference in New Issue
Block a user