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

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Sat Dec 23 11:09:19 PST 2023


Issue #3364 has been reported by vinipsmaker.

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

* 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