On Wed, 13 Mar 2024 at 20:48, Stefan Hajnoczi <stefa...@redhat.com> wrote: > > +extern bool laio_has_fdsync(int); > Please declare this in include/block/raw-aio.h alongside the other laio APIs. > > FDSYNC support should be probed at open() time and the result should be > stored in a new bool field like s->laio_supports_fdsync. That way the > cost of laio_has_fdsync() on every flush request is avoided.
* Okay. Here 's' is a BDRVRawState object and file open seems to happen in the raw_open_common() function? I'll move the laio_has_fdsync() call there and see how it works. Thank you. --- - Prasad