raw-posix: add Linux native AIO support
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Review
Quoted 10 lines · malc
(quoted diff) +7
-2- } else if (s->use_aio) { + } + else if (s->use_aio) { +#ifdef CONFIG_LINUX_AIO return laio_submit(bs, s->aio_ctx, s->fd, sector_num, qiov, - nb_sectors, cb, opaque, type); + nb_sectors, cb, opaque, type); +#else + abort(); +#endif
use_aio is only ever set in CONFIG_LINUX_AIO protected section, so the #else section is not needed. Even if that were not the case, falling back to paio_submit() feels like a better idea than aborting emulation.
fwiw, s->use_aio is a bad name as well, as it refers to linux aio, while the file also supports posix aio...
Quoted 6 lines · Riku Voipio
use_aiois only ever set inCONFIG_LINUX_AIOprotected section, so the #else section is not needed. Even if that were not the case, falling back topaio_submit()feels like a better idea than aborting emulation.fwiw,
s->use_aiois a bad name as well, as it refers to linux aio, while the file also supports posix aio...
Yes. it was more of a quick hack. I just wanted to get a working patch out ASAP as I expect a long discussion about how to correctly set the flag to use and other bikesheds. I can send a version that just stores the bdrv_ flags in the raw state and we can check that.