[DragonFlyBSD - Bug #3364] aio_read2() and aio_write2()

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Sat Feb 10 18:39:22 PST 2024


Issue #3364 has been updated by vinipsmaker.


FreeBSD solved this problem recently. Maybe DragonFly BSD can port the patches:

* https://reviews.freebsd.org/rGe4b7bbd6ab77e908a60362aa29e518f224a117b0
* https://reviews.freebsd.org/rG06cb1c3f9528f088bdaf10d28dcfe7eeaad726d3
* https://reviews.freebsd.org/rG8dfc788b8480a13f1f945f0a94d8b1e327af5c6f
* https://reviews.freebsd.org/rGa52cb4c480f270fc7158a0f58179f7b80d8a5b3c

----------------------------------------
Bug #3364: aio_read2() and aio_write2()
http://bugs.dragonflybsd.org/issues/3364#change-14534

* Author: vinipsmaker
* Status: New
* Priority: Normal
* Target version: 6.6
* Start date: 2023-12-23
----------------------------------------
I'd like to use AIO to read files w/o specifying an offset in the member aio_offset. Instead, I'd like for the current file offset to be used. For Linux, io_uring supports using -1 for the offset to indicate that the current file position should be used instead of passing in an explicit offset. I'd like to do the same on DragonFly BSD.

I propose the following interface:

int aio_read2(struct aiocb *iocb, unsigned flags);
int aio_write2(struct	aiocb *iocb, unsigned flags);

aio_read(iocb) would be equivalent to aio_read2(iocb, 0) and aio_write(iocb) would be equivalent to aio_write2(iocb, 0).

Then we would define the following flags:

AIO_IGNOREOFFSET

The flag AIO_IGNOREOFFSET would instruct the call to ignore aio_offset in aiocb and use the file position (lseek) if applicable. The flag AIO_IGNOREOFFSET should not conflict with LIO opcodes so one could OR it into aio_lio_opcode for usage with lio_listio() as well. I think that should be enough to close all ties.



-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account


More information about the Bugs mailing list