Comment 9 for bug 445592

Revision history for this message
Charles Kerr (charlesk) wrote : Re: Transmission Ext4 / data loss?

> Hmm maybe we should peek in the KTorrent source code. They even are smart enough to handle XFS vs ext3 vs ext4 vs vfat independently. For some unknown definition of "smart" :)

KTorrent uses ftruncate64() or ftruncate() in its "quick" mode, and posix_fallocate64() or posix_fallocate() in its non-quick mode. The problem with this is described in detail (even in terms of p2p apps) in http://www.linux-mag.com/id/7272/2/ -- if you use posix_fallocate() on ext3, it will attempt to emulate fallocate() by writing all zeros to the file. This emulation step can be very slow.

John, are fallocate64() and fallocate() (note the lack of the "posix_" prefix) present in the glibc that ships with 9.10?