Changeset 8198


Ignore:
Timestamp:
Apr 10, 2009, 2:26:01 PM (13 years ago)
Author:
charles
Message:

(trunk libT) possible IO speedup on OS X based on feedback from ticket #1967

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/fdlimit.c

    r8193 r8198  
    228228        return NULL;
    229229
    230 #if defined( SYS_DARWIN )
    231     fcntl( fd, F_NOCACHE, 1 );
    232     fcntl( fd, F_RDAHEAD, sequential );
    233 #elif defined( HAVE_POSIX_FADVISE )
     230#ifdef HAVE_POSIX_FADVISE
    234231    posix_fadvise( fd, 0, 0, sequential ? POSIX_FADV_SEQUENTIAL : POSIX_FADV_RANDOM );
    235232#endif
     
    308305        preallocateFileSparse( file->fd, desiredFileSize );
    309306
    310 #if defined( SYS_DARWIN )
    311     fcntl( file->fd, F_NOCACHE, 1 );
    312     fcntl( file->fd, F_RDAHEAD, 0 );
    313 #elif defined( HAVE_POSIX_FADVISE )
     307#ifdef HAVE_POSIX_FADVISE
    314308    posix_fadvise( file->fd, 0, 0, POSIX_FADV_RANDOM );
    315309#endif
Note: See TracChangeset for help on using the changeset viewer.