Page MenuHomeFreeBSD

Allow LIO_READV and LIO_WRITEV in lio_listio().
ClosedPublic

Authored by tmunro on Aug 21 2021, 3:07 AM.
Tags
None
Referenced Files
F81644375: D31627.id.diff
Fri, Apr 19, 10:02 AM
F81586913: D31627.id93993.diff
Thu, Apr 18, 1:27 PM
Unknown Object (File)
Sun, Apr 7, 4:58 AM
Unknown Object (File)
Fri, Mar 29, 2:57 PM
Unknown Object (File)
Feb 21 2024, 8:08 PM
Unknown Object (File)
Jan 16 2024, 11:43 AM
Unknown Object (File)
Jan 12 2024, 7:49 PM
Unknown Object (File)
Jan 12 2024, 4:18 PM
Subscribers

Details

Summary

Allow multiple vector IOs to be started with one system call. The aio_readv() and aio_writev() functions already used the same code as lio_listio() under the covers. This commit just exposes the formerly internal-only LIO_READV and LIO_WRITEV opcodes to user space.

The new opcode are only visible to user space if __BSD_VISIBLE is defined, being extensions to POSIX, just like the aio_readv() and aio_writev() functions.

The other obvious candidate is LIO_SYNC, but that involves answering some tricky questions about dependencies and is left for later.

I subscribed the reviewers of D27743 (aio_readv() and aio_writev()).

Test Plan

A simple kyua test is included.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

tmunro created this revision.

Reuploaded patch with -U99999, no change.

asomers requested changes to this revision.Aug 21 2021, 4:23 AM

Don't forget to bump the date in the man page.

tests/sys/aio/lio_test.c
230

The ftruncate is not necessary, since Kyua will always run the test in a brand-new directory.

This revision now requires changes to proceed.Aug 21 2021, 4:23 AM
tmunro marked an inline comment as done.
This revision is now accepted and ready to land.Aug 21 2021, 1:25 PM
lib/libc/sys/lio_listio.2
231

s/FreeeBSD/.Fx/