fix build on machines that have sync_file_range

This commit is contained in:
Sears Russell 2011-08-03 20:22:48 +00:00
parent 98da9a54b8
commit 50ec28e806
2 changed files with 3 additions and 3 deletions

View file

@ -385,7 +385,7 @@ static int file_force_range(stasis_handle_t *h, lsn_t start, lsn_t stop) {
#ifdef HAVE_SYNC_FILE_RANGE
if(!stop) stop = impl->end_pos;
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_WRITE |
SYNC_FILE_RANGE_WAIT_AFTER);

View file

@ -312,8 +312,8 @@ static int pfile_force_range(stasis_handle_t *h, lsn_t start, lsn_t stop) {
#ifdef HAVE_SYNC_FILE_RANGE
// stop of zero syncs to eof.
DEBUG("pfile_force_range calling sync_file_range %lld %lld\n",
start-impl->start_pos, stop-start); fflush(stdout);
int ret = sync_file_range(impl->fd, start-impl->start_pos, stop-start,
start, stop-start); fflush(stdout);
int ret = sync_file_range(impl->fd, start, stop-start,
SYNC_FILE_RANGE_WAIT_BEFORE |
SYNC_FILE_RANGE_WRITE |
SYNC_FILE_RANGE_WAIT_AFTER);