RTEMS | aio_fsync() does not support O_DSYNC (#5040)

Alessandro Nardin (@AlessandroNardin) gitlab at rtems.org
Wed Jun 26 13:41:11 UTC 2024




Alessandro Nardin commented: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5040#note_108133


I reviewed the documentation and it doesn't specify whether `aio_fsync()` should synchronize after every individual operation or just once after all enqueued operations are completed. The specification only states that all currently queued operations for the file should be synchronized.

>From my understanding, the current implementation uses the latter approach, synchronizing once after all enqueued operations have completed. However, I have some concerns about the implementation details:

To ensure synchronization after all already enqueued operations, the sync request should be placed at the end of the queue. This is because we process the next operation from the top of the queue.

However, in our implementation, the insertion into the queue is not always at the bottom. It's based on the request priority, with requests having a low `aio_reqprio` value being placed earlier in the queue. I’ve noticed that there’s no mechanism to guarantee that the `sync` request is placed at the bottom of the queue. Is this an error or am I misunderstanding the code?

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5040#note_108133
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20240626/59d04962/attachment-0001.htm>


More information about the bugs mailing list