1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 08:43:27 +00:00

(trunk libT) on platforms that support it, use POSIX_FADV_SEQUENTIAL instead of POSIX_FADV_RANDOM. (http://trac.transmissionbt.com/ticket/1521#comment:25)

This commit is contained in:
Charles Kerr 2009-05-31 21:20:49 +00:00
parent 04fb0919eb
commit ea93eab02d

View file

@ -320,8 +320,8 @@ TrOpenFile( int i,
/* open the file */
flags = doWrite ? ( O_RDWR | O_CREAT ) : O_RDONLY;
#ifdef O_RANDOM
flags |= O_RANDOM
#ifdef O_SEQUENTIAL
flags |= O_SEQUENTIAL;
#endif
#ifdef O_LARGEFILE
flags |= O_LARGEFILE;
@ -342,7 +342,7 @@ TrOpenFile( int i,
preallocateFileSparse( file->fd, desiredFileSize );
#ifdef HAVE_POSIX_FADVISE
posix_fadvise( file->fd, 0, 0, POSIX_FADV_RANDOM );
posix_fadvise( file->fd, 0, 0, POSIX_FADV_SEQUENTIAL );
#endif
tr_free( filename );