On Mon, May 15, 2006, Henrik Nordstrom wrote:

> Doubtful. The infrastructure required for native pread/pwrite support is
> just a small subset of what is required for POSIX AIO..  (ability to
> schedule absolute I/O without relying on the file pointer).

*nod*

> But lets not worry about that. If there is a pread/pwrite then use it
> and be happy. The drawback of it being emulated should only be
> performance, not functionality (assuming the emulation is correct). I
> doubt you will find a pthreads implementation without working
> pread/pwrite.

I'll eventually turn all of this into compile-time options, with
relevant warnings as to what works/what doesn't. I'd like to hope
the emulation of pread/pwrite is 'correct' but if you're right it
will be emulated by userspace lseek/read and lseek/write calls - which
must be made atomic somehow. I guess its not that bad for the normal AUFS
implementation - it only fails spectacularly for COSS (since the emulation
w/ mutexes would end up serialising all accesses to the one COSS data
file descriptor.)

I still haven't figured out the right incantation to convince unistd.h
to give me pread/pwrite (and their 64 bit equivalents where applicable.)




Adrian

Reply via email to