Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2849 closed Enhancement (fixed)

When possible, use fallocate64() for file preallocation

Reported by: charles Owned by: charles
Priority: Normal Milestone: 1.93
Component: libtransmission Version: 1.83
Severity: Normal Keywords:
Cc:

Description (last modified by charles)

Now that the Linux distributions are winding their way around to a version of glibc that support fallocate64(), we definitely need to get this into libtransmission's file preallocation code.

Background: http://www.linux-mag.com/id/7272/2/

looks like glibc 2.10.1 is in Karmic, but http://repo.or.cz/w/glibc.git?a=commitdiff;h=1f3615a1c97a030bca59f728f998947f852679b9;hp=9e471dad8e173806cbbfb704875d5ae40e36fa34 says that the fallocate*() functions are new in glibc 2.11.

Ubuntu 10.04 currently has eglibc 2.11.1, and it looks like the upcoming Fedora will have >= 2.11 as well.

Adding backport-1.8x tag because this definitely needs to be in the Spring distro releases even if 1.9 isn't out by then.

Change History (6)

comment:1 Changed 11 years ago by charles

  • Status changed from new to assigned

comment:2 Changed 11 years ago by charles

  • Description modified (diff)
  • Summary changed from Use fallocate() when possible for file preallocation to When possible, use fallocate64() for file preallocation

comment:3 Changed 11 years ago by charles

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in trunk for 1.90 by r10075

comment:4 Changed 11 years ago by charles

This is now the default behavior in sparse allocation mode, too.

trunk: r10336

1.9x: r10337

comment:5 Changed 11 years ago by charles

  • Keywords backport-1.9x added; backport-1.8x removed
  • Milestone changed from 1.90 to 2.00

r10075 has been reverted. defaulting to `full' mode just because fallocate64() is available in glibc was a bad idea -- fallocate64() can easily fail, and in those cases, allocation will still be slow.

r10337 addresses the same problem in a way that fails more gracefully.

r10075 has been reverted for 2.00 in r10463 and should also be applied to 1.9x if/when we do another 1.9x release

comment:6 Changed 11 years ago by charles

  • Keywords backport-1.9x removed
  • Milestone changed from 2.00 to 1.93
Note: See TracTickets for help on using tickets.