Changeset 8298


Ignore:
Timestamp:
Apr 26, 2009, 7:50:31 PM (13 years ago)
Author:
charles
Message:

(trunk libT) tweak tr_open_file_for_scanning() on OS X for sequential, non-cached reading suitable for verify() and tr_fileLoad()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/fdlimit.c

    r8291 r8298  
    231231    posix_fadvise( fd, 0, 0, POSIX_FADV_SEQUENTIAL );
    232232#endif
     233#ifdef SYS_DARWIN
     234    fcntl( fd, F_NOCACHE, 1 );
     235    fcntl( fd, F_RDAHEAD, 1 );
     236#endif
    233237
    234238    return fdopen( fd, "r" );
     
    240244#if defined(HAVE_POSIX_FADVISE)
    241245    posix_fadvise( fd, 0, 0, POSIX_FADV_DONTNEED );
    242 #elif defined(SYS_DARWIN)
    243     fcntl( fd, F_NOCACHE, 1 );
    244246#endif
    245247}
Note: See TracChangeset for help on using the changeset viewer.