Package: coreutils
Version: 8.5-1
Severity: normal
File: /bin/cp

Hi,

when copying files the size of the resulting file is known (except in
race conditions) beforehand and should be communicated to the
filesystem using posix_fallocate(). This ensures there is enough space
for the file and more importantly allows the filesystem to place the
file better, idealy as on continious chunk, on the filesystem.

Some care must be taken to ftruncate() the file to its smaller size if
the source file has shrunk while copying.

If the file has grown while copying one could posix_fallocate() to the
new size repeadately till the full file is copied but it probably
wouldn't hurt to ignore that case and just copy the remainder of the
grown file without allocating space first.

MfG
        Goswin

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (666, 'unstable'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.39-rc7-xen-1 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages coreutils depends on:
ii  libacl1                       2.2.51-3   Access control list shared library
ii  libattr1                      1:2.4.46-3 Extended attribute shared library
ii  libc6                         2.13-4     Embedded GNU C Library: Shared lib
ii  libselinux1                   2.0.96-1   SELinux runtime shared libraries

coreutils recommends no packages.

coreutils suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to