[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: RE24 testing (pre-testing on 2.4.27)



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

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
>>> work.
>> 
>> 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
> vfs_fsync().)
> 
> 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.

Cheers,
- -- 
Xin LI <delphij@delphij.net>	https://www.delphij.net/
FreeBSD - The Power to Serve!		Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iQEcBAEBCAAGBQJOuaSxAAoJEATO+BI/yjfBdRwH/00heGoWHIFAJ3VveoiyH6VG
KetiaYrLynl3frIwyhdcRsEIX3ZBEftc1GYj/bE79VsIL8vSkbJvrWsCnyMmJt+z
0Z2/ZRSeh2159FFSkf+I2LQouJtnytlYREwwv8z2AdpYPqPhyvMH712o3EGEVNtc
mdgbQUi5cdCShkZgvsFqQW+hiFckj6xRBZhT8pdTjimjWknOJ3G5jnubk7SyIGQv
wP49al/ETwrB6LaX+VTbJotS5kEif+gwkRz5RH0vq4R/TYlMTWODEanJ0ZwRCn95
dLYAmELZi+C59oMQRRVEUAchVSVKmiY3dnfohllJp4tTOLIn3lMS7PiuoqbaCPs=
=yyp7
-----END PGP SIGNATURE-----