Changeset 13803


Ignore:
Timestamp:
Jan 18, 2013, 7:20:22 PM (8 years ago)
Author:
jordan
Message:

(libT) #5102 'don't invalidate the OS' filesystem cache when closing files -- done.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/fdlimit.c

    r13681 r13803  
    285285tr_close_file (int fd)
    286286{
    287 #if defined (HAVE_POSIX_FADVISE)
    288   /* Set hint about not caching this file.
    289      It's okay for this to fail silently, so don't let it affect errno */
    290   const int err = errno;
    291   posix_fadvise (fd, 0, 0, POSIX_FADV_DONTNEED);
    292   errno = err;
    293 #endif
    294 #ifdef SYS_DARWIN
    295   /* it's unclear to me from the man pages if this actually flushes out the cache,
    296    * but it couldn't hurt... */
    297   fcntl (fd, F_NOCACHE, 1);
    298 #endif
    299287  close (fd);
    300288}
Note: See TracChangeset for help on using the changeset viewer.