This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Missing <aio_misc.h> exported header ?
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: libc-help at sourceware dot org
- Date: Wed, 4 Sep 2019 16:28:39 -0300
- Subject: Re: Missing <aio_misc.h> exported header ?
- References: <CAE9vp3Lw5VN0K=U=FpmeGsqYUu+YoWUMZXttmJLak4K-eMr5fA@mail.gmail.com>
On 22/08/2019 08:53, Xavier Roche wrote:
> Dear glibc users,
>
> The librt's <aio_misc.h> (which can be found in
> sysdeps/pthread/aio_misc.h) header file seems not to be exported as
> public header file (like <aio.h> is)
>
> I was wondering if there was a reason behind this ?
>
> The LIO_DSYNC/LIO_SYNC operations are implemented in glibc's librt and
> seem perfectly working (providing much better performances when
> syncing a lot of small files, specifically):
>
> /* Extend the operation enum. */
> enum
> {
> LIO_DSYNC = LIO_READ + 1,
> LIO_SYNC,
> LIO_READ64 = LIO_READ | 128,
> LIO_WRITE64 = LIO_WRITE | 128
> };
>
> [ Also note that the sysdeps/generic/aio_misc.h version includes the
> erroneous LIO_DSYNC definition (b8744bea9bf, fix by Roland McGrath a
> long time ago) ]
Because it an internal-only implementation files. The Linux one, for
instance, calls syscall directly using internal macros (INTERNAL_SYSCALL)
which are not meant to be exported.
The LIO_DSYNC/LIO_SYNC are used to call the internal __aio_enqueue_request,
external usage should use aio_fsync. By "providing much better performances when
> syncing a lot of small files" which exactly usage pattern are you referring?