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.


_______________________________________________
bugs mailing list
bugs@rtems.org
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to