FreeBSD: Unable to locate posix_fadvise64 in libc. Leaving as a no-op.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Under FreeBSD warnings about missing posix_fadvise64 are observed:
object-auditor STDOUT: WARNING:root:Unable to locate posix_fadvise64 in libc. Leaving as a no-op.
FreeBSD's libc does not provide posix_fadvise64. It is not needed here because off_t is 8 bytes on both 32 and 64-bit platforms (see the output below).
Could the swift be fixed to call posix_fadvise on FreeBSD instead of posix_fadvise64 (e.g. like in the attached patch)
Additional info about off_t size on FreeBSD i386:
root@ref9-i386:/tmp # uname -a
FreeBSD ref9-i386 9.1-STABLE FreeBSD 9.1-STABLE #4 r250376M: Wed May 8 21:50:09 EEST 2013 <email address hidden>
root@ref9-i386:/tmp # man posix_fadvise | head -14
POSIX_FADVISE(2) FreeBSD System Calls Manual POSIX_FADVISE(2)
NAME
posix_fadvise -- give advice about use of file data
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <fcntl.h>
int
posix_
root@ref9-i386:/tmp # cat test_off.c
#include <sys/types.h>
#include <stdio.h>
int
main()
{
return (0);
}
root@ref9-i386:/tmp # gcc test_off.c
root@ref9-i386:/tmp # ./a.out
sizeof(off_t) = 8
Mikolaj, is this still an issue in Swift? If so, can you propose your patch to gerrit for review and inclusion in Swift?