Merge lp:~fujita-tomonori-deactivatedaccount/swift/fadvise into lp:~hudson-openstack/swift/trunk

Proposed by FUJITA Tomonori
Status: Merged
Approved by: gholt
Approved revision: 311
Merged at revision: 316
Proposed branch: lp:~fujita-tomonori-deactivatedaccount/swift/fadvise
Merge into: lp:~hudson-openstack/swift/trunk
Diff against target: 16 lines (+2/-2)
1 file modified
swift/common/utils.py (+2/-2)
To merge this branch: bzr merge lp:~fujita-tomonori-deactivatedaccount/swift/fadvise
Reviewer Review Type Date Requested Status
gholt (community) Approve
Review via email: mp+65242@code.launchpad.net

Description of the change

This fixes the bug that drop_buffer_cache() doesn't work on systems where off_t isn't 64 bits.

To post a comment you must log in.
Revision history for this message
gholt (gholt) wrote :

Looks fine to me.

review: Approve
Revision history for this message
gholt (gholt) wrote :

It has been a couple days now and this is a pretty simple change so I'm just going to let it land.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'swift/common/utils.py'
2--- swift/common/utils.py 2011-06-05 23:22:35 +0000
3+++ swift/common/utils.py 2011-06-20 17:50:24 +0000
4@@ -144,12 +144,12 @@
5 """
6 global _posix_fadvise
7 if _posix_fadvise is None:
8- _posix_fadvise = load_libc_function('posix_fadvise')
9+ _posix_fadvise = load_libc_function('posix_fadvise64')
10 # 4 means "POSIX_FADV_DONTNEED"
11 ret = _posix_fadvise(fd, ctypes.c_uint64(offset),
12 ctypes.c_uint64(length), 4)
13 if ret != 0:
14- logging.warn("posix_fadvise(%s, %s, %s, 4) -> %s"
15+ logging.warn("posix_fadvise64(%s, %s, %s, 4) -> %s"
16 % (fd, offset, length, ret))
17
18