Ignore:
Timestamp:
Feb 2, 2010, 3:01:25 AM (12 years ago)
Author:
charles
Message:

(trunk libT) #2849 "When possible, use fallocate64() for file preallocation" -- implemented for 1.90

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/fdlimit.c

    r10031 r10075  
    4444#endif
    4545
     46#ifdef HAVE_FALLOCATE64
     47  /* FIXME can't find the right #include voodoo to pick up the declaration.. */
     48  extern int fallocate64( int fd, int mode, uint64_t offset, uint64_t len );
     49#endif
     50
    4651#ifdef HAVE_XFS_XFS_H
    4752 #include <xfs/xfs.h>
     
    147152    if( fd >= 0 )
    148153    {
     154# ifdef HAVE_FALLOCATE64
     155       if( !success )
     156       {
     157           success = !fallocate64( fd, 0, 0, length );
     158       }
     159# endif
    149160# ifdef HAVE_XFS_XFS_H
    150161        if( !success && platform_test_xfs_fd( fd ) )
Note: See TracChangeset for help on using the changeset viewer.