-----BEGIN PGP SIGNED MESSAGE-----
On 11/08/11 13:45, Aaron Richton wrote:
On Mon, 7 Nov 2011, Howard Chu wrote:
>> It seems that back-mdb really expects FDSYNC and fdatasync be
>> available on target system. Currently FreeBSD does not have
>> implemented these semantics (yet).
>> I've made a workaround in the FreeBSD port to make it work; it
>> would be nice to have configure script test if FDSYNC and
>> fdatasync is available and make the corresponding workaround
>> (FSYNC and fsync) if not so building from source would just
> You're welcome to submit appropriate patches for configure.in and
> any affected code.
Do you envision issues with using msync() instead, across the
board? I would think that, given that back-mdb only makes sense
when _POSIX_MAPPED_FILES, msync would present a more portable way
of getting to the underlying fsync()/fdatasync() calls. (Heck, on
Linux, it's just a couple lines of error checking wrapping a
Xin: is msync() available on FreeBSD? You're mentioning fsync as
the proposed patch...
msync() is available on FreeBSD but can not be used here if I
understood the code correctly (OpenLDAP don't use mmap for writes in mdb).
The right solution would be to implement fdatasync() in FreeBSD, I'm
evaluating the work needs to be done but that's beyond the scope of
this mailing list I think. I can live with a workaround for now.
Xin LI <delphij(a)delphij.net> https://www.delphij.net/
FreeBSD - The Power to Serve! Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)
-----END PGP SIGNATURE-----