Bug 518581
Summary: | [RHEL5] glibc misses sync_file_range syscall interface | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Kirby Zhou <kirbyzhou> |
Component: | glibc | Assignee: | Andreas Schwab <schwab> |
Status: | CLOSED CANTFIX | QA Contact: | BaseOS QE <qe-baseos-auto> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 5.3 | CC: | drepper, jde |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2009-11-23 03:19:55 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Kirby Zhou
2009-08-21 03:37:55 UTC
It has only been added to glibc 2.6, and cannot be backported due to ABI breakage. You can always fall back to syscall(3). Can give me a example how to use syscall(3) to call sync_file_range? As comment #1 says, no chance to backport this. See the syscall man page for instructions. then why document it if it's broken and you're not going to fix it? .. might want to FTFM over at sync_file_range(2) - in the meantime - borrowing from glibc 2.6 .. any thoughts on this implementation for a hacky workaround for those still on your "ancient releases" .. (eg: RHEL5.3)?: #ifdef ULI_WONT_FIX_THIS_IN_GLIBC2.5 #define NR_sync_file_range 277 int sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags) { return syscall (NR_sync_file_range, fd, __LONG_LONG_PAIR ((long) (from >> 32), (long) from), __LONG_LONG_PAIR ((long) (to >> 32), (long) to), flags); } #endif assuming of course that you're on an x86_64 and include/asm-x86_64/unistd.h has the correct entry (fwiw - fio is starting to use this now) |