code: public static void syncFileRangeIfPossible(
        FileDescriptor fd, long offset, long nbytes, int flags)
        throws NativeIOException {
      InjectionHandler.processEvent(InjectionEventCore.NATIVEIO_SYNC_FILE_RANGE,
          flags);
      if (nativeLoaded && syncFileRangePossible) {
        try {
          sync_file_range(fd, offset, nbytes, flags);
        } catch (UnsupportedOperationException uoe) {
          LOG.warn("syncFileRangeIfPossible() failed", uoe);
          syncFileRangePossible = false;
        } catch (UnsatisfiedLinkError ule) {
          LOG.warn("syncFileRangeIfPossible() failed", ule);
          syncFileRangePossible = false;
        } catch (NativeIOException nie) {
          LOG.warn("syncFileRangeIfPossible() failed: fd " + fd + " offset "
              + offset + " nbytes " + nbytes + " flags " + flags, nie);
          throw nie;
        }
      }
    }
docs: Call sync_file_range on the given file descriptor. See the manpage
  for this syscall for more information. On systems where this
  call is not available, does nothing.
  
  @throws NativeIOException if there is an error with the syscall