From: Zoran V. <zv...@ar...> - 2006-01-02 18:44:30
|
Am 02.01.2006 um 19:13 schrieb Vlad Seryakov: > I did very simple test, replaced write with aio_write and at the > end checked aio_error/aio_return, they all returned 0 so mmap > should work because file is synced. when i was doing aio_write i > used aio_offset, so each aio_write would put data into separate > region on the file. > > Unfortunately i removed modified driver.c by accident, so i will > have to do it again but something is not right in simply replacing > write with aio_write and mmap. Without mmap, GetForm will have to > read the file manually and parse it, it makes it more complicated > and still, if writes are not complete we may get SIGBUS again. > > The problem i see here i cannot be sure that all writes are > completed, aio_error/aio_return are used to check only one last > operation, not the batch of writes. Hmmm... that means that before writing the next chunk, you should check the status of the last and skip if still not written? OTOH, how come you get SIGBUS? And where? Normally this might be only if you mmap the file as some structure, not char array? Zoran |