fix build on machines that have sync_file_range
This commit is contained in:
parent
98da9a54b8
commit
50ec28e806
2 changed files with 3 additions and 3 deletions
|
@ -385,7 +385,7 @@ static int file_force_range(stasis_handle_t *h, lsn_t start, lsn_t stop) {
|
||||||
#ifdef HAVE_SYNC_FILE_RANGE
|
#ifdef HAVE_SYNC_FILE_RANGE
|
||||||
if(!stop) stop = impl->end_pos;
|
if(!stop) stop = impl->end_pos;
|
||||||
DEBUG("Calling sync_file_range\n");
|
DEBUG("Calling sync_file_range\n");
|
||||||
ret = sync_file_range(fd, start-off, (stop-start),
|
ret = sync_file_range(fd, start, (stop-start),
|
||||||
SYNC_FILE_RANGE_WAIT_BEFORE |
|
SYNC_FILE_RANGE_WAIT_BEFORE |
|
||||||
SYNC_FILE_RANGE_WRITE |
|
SYNC_FILE_RANGE_WRITE |
|
||||||
SYNC_FILE_RANGE_WAIT_AFTER);
|
SYNC_FILE_RANGE_WAIT_AFTER);
|
||||||
|
|
|
@ -312,8 +312,8 @@ static int pfile_force_range(stasis_handle_t *h, lsn_t start, lsn_t stop) {
|
||||||
#ifdef HAVE_SYNC_FILE_RANGE
|
#ifdef HAVE_SYNC_FILE_RANGE
|
||||||
// stop of zero syncs to eof.
|
// stop of zero syncs to eof.
|
||||||
DEBUG("pfile_force_range calling sync_file_range %lld %lld\n",
|
DEBUG("pfile_force_range calling sync_file_range %lld %lld\n",
|
||||||
start-impl->start_pos, stop-start); fflush(stdout);
|
start, stop-start); fflush(stdout);
|
||||||
int ret = sync_file_range(impl->fd, start-impl->start_pos, stop-start,
|
int ret = sync_file_range(impl->fd, start, stop-start,
|
||||||
SYNC_FILE_RANGE_WAIT_BEFORE |
|
SYNC_FILE_RANGE_WAIT_BEFORE |
|
||||||
SYNC_FILE_RANGE_WRITE |
|
SYNC_FILE_RANGE_WRITE |
|
||||||
SYNC_FILE_RANGE_WAIT_AFTER);
|
SYNC_FILE_RANGE_WAIT_AFTER);
|
||||||
|
|
Loading…
Reference in a new issue