Menu

#179 Could use posix_fallocate() or fallocate() by default

closed
nobody
None
1
2012-09-28
2010-06-22
Ant Bryan
No

from Debian
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586339

From: Julian Andres Klode jak@debian.org
To: Debian Bug Tracking System submit@bugs.debian.org
Subject: aria2: Could use posix_fallocate() or fallocate() by default
Date: Fri, 18 Jun 2010 16:57:25 +0200

[Message part 1 (text/plain, inline)]

Package: aria2
Version: 1.9.4-1
Severity: wishlist

Using posix_fallocate() is much better than allocating files
by writing 0s to them, at least on filesystems that support
it (e.g. ext4,btrfs,xfs).

On other file systems, it would block aria2 completely
until it completes. It might be possible to use multiple
posix_fallocate() calls with small 'len' to have progress
display on those filesystems.

Another idea would be to use posix_fallocate() if the
file that shall be allocated is located on a filesystem
that supports it.

Using the Linux fallocate() syscall and falling back
to writing 0s if it returns ENOSYS might also work, but
I have not checked it.

-- System Information:
Debian Release: lenny/sid
APT prefers experimental
APT policy: (990, 'experimental'), (990, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages aria2 depends on:
ii libc-ares2 1.7.3-1 library for asyncronous name resol
ii libc6 2.11.2-1 Embedded GNU C Library: Shared lib
ii libgcc1 1:4.4.4-5 GCC support library
ii libgcrypt11 1.4.5-2 LGPL Crypto library - runtime libr
ii libgnutls26 2.8.6-1 the GNU TLS library - runtime libr
ii libsqlite3-0 3.6.23.1-4 SQLite 3 shared library
ii libstdc++6 4.4.4-5 The GNU Standard C++ Library v3
ii libxml2 2.7.7.dfsg-2 GNOME XML library
ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime

Versions of packages aria2 recommends:
ii ca-certificates 20090814 Common CA certificates

aria2 suggests no packages.

-- no debconf information

--
Julian Andres Klode - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.

Discussion

  • tujikawa

    tujikawa - 2010-07-04

    Implemented in r2241. I tested under Ubuntu(ext4) and Debian(ext3).
    If anyone interested, please test this feature.

     
  • tujikawa

    tujikawa - 2010-07-19

    Implemented in 1.10.0

     

Log in to post a comment.

Auth0 Logo