mldonkey-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-commits] mldonkey config/configure.in distrib/ChangeLog ...


From: mldonkey-commits
Subject: [Mldonkey-commits] mldonkey config/configure.in distrib/ChangeLog ...
Date: Sat, 20 Mar 2010 13:30:41 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       10/03/20 13:30:41

Modified files:
        config         : configure.in 
        distrib        : ChangeLog 
        src/config/unix: os_stubs_c.c 
        src/daemon/common: commonOptions.ml 

Log message:
        patch #7076

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/config/configure.in?cvsroot=mldonkey&r1=1.322&r2=1.323
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1405&r2=1.1406
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/config/unix/os_stubs_c.c?cvsroot=mldonkey&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonOptions.ml?cvsroot=mldonkey&r1=1.228&r2=1.229

Patches:
Index: config/configure.in
===================================================================
RCS file: /sources/mldonkey/mldonkey/config/configure.in,v
retrieving revision 1.322
retrieving revision 1.323
diff -u -b -r1.322 -r1.323
--- config/configure.in 23 Oct 2009 05:54:35 -0000      1.322
+++ config/configure.in 20 Mar 2010 13:30:37 -0000      1.323
@@ -704,7 +704,7 @@
 ])
 
 # various header files
-AC_CHECK_FUNCS(setrlimit getrlimit strerror_r strerror)
+AC_CHECK_FUNCS(setrlimit getrlimit strerror_r strerror posix_fallocate)
 AC_CHECK_HEADERS(byteswap.h,,)
 AC_CHECK_HEADERS([sys/utsname.h])
 AC_CHECK_HEADERS(arpa/inet.h,,)

Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1405
retrieving revision 1.1406
diff -u -b -r1.1405 -r1.1406
--- distrib/ChangeLog   20 Mar 2010 13:25:22 -0000      1.1405
+++ distrib/ChangeLog   20 Mar 2010 13:30:39 -0000      1.1406
@@ -15,6 +15,10 @@
 =========
 
 2010/03/20
+7076: Support preallocating files on Unix systems (drwho)
+      Recent Linux kernels support fast preallocation when the filesystem is
+      XFS, EXT4 or BTRFS, this patch adds preallocation support when
+      posix_fallocate() is available
 6968: GTK2 GUI: Fix switching server preferred status (dcoppa)
 -------------------------------------------------------------------------------
 2009/10/23: version 3.0.1 = tag release-3-0-1

Index: src/config/unix/os_stubs_c.c
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/config/unix/os_stubs_c.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- src/config/unix/os_stubs_c.c        24 Feb 2009 18:53:57 -0000      1.18
+++ src/config/unix/os_stubs_c.c        20 Mar 2010 13:30:40 -0000      1.19
@@ -64,13 +64,17 @@
 
 *******************************************************************/
 
-/* TODO: write whole file if sparse disabled */
 void os_ftruncate(OS_FD fd, OFF_T len, /* bool */ int sparse)
 {
   int64 cursize;
   if(!fd) failwith("ftruncate32: file is closed");
   
   cursize = os_getfdsize(fd);
+#ifdef HAVE_POSIX_FALLOCATE 
+  if (!sparse)
+    if (posix_fallocate(fd,cursize,len-cursize) == 0)
+      return;
+#endif
   if(cursize < len){
     int zero = 0;
     OFF_T result = lseek(fd, len-1, SEEK_SET);

Index: src/daemon/common/commonOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonOptions.ml,v
retrieving revision 1.228
retrieving revision 1.229
diff -u -b -r1.228 -r1.229
--- src/daemon/common/commonOptions.ml  22 Oct 2009 19:56:42 -0000      1.228
+++ src/daemon/common/commonOptions.ml  20 Mar 2010 13:30:41 -0000      1.229
@@ -1335,7 +1335,7 @@
     string_option "755"
 
 let create_file_sparse = define_option current_section ["create_file_sparse"]
-  "Create new files as sparse, only valid on MinGW for files on NTFS drives"
+  "Create new files as sparse (not supported on FAT volumes)"
     bool_option true
 
 let hdd_temp_minfree = define_option current_section ["hdd_temp_minfree"]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]