Date: Sun, 11 Feb 2024 07:28:17 -0700 From: Alan Somers <asomers@freebsd.org> To: Konstantin Belousov <kib@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8dfc788b8480 - main - aio_read2/aio_write2: add AIO_OP2_VECTORED Message-ID: <CAOtMX2j12gi%2BJOVRLO1hXp1mfO_%2BCYQ7_GQRWopz3UKh%2ByNTcw@mail.gmail.com> In-Reply-To: <202402110154.41B1scZ9090228@gitrepo.freebsd.org> References: <202402110154.41B1scZ9090228@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
What's the difference between this symbol and the existing LIO_VECTORED symbol ? They seem redundant to me. On Sat, Feb 10, 2024 at 6:54=E2=80=AFPM Konstantin Belousov <kib@freebsd.or= g> wrote: > > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D8dfc788b8480a13f1f945f0a94= d8b1e327af5c6f > > commit 8dfc788b8480a13f1f945f0a94d8b1e327af5c6f > Author: Konstantin Belousov <kib@FreeBSD.org> > AuthorDate: 2024-02-03 18:09:36 +0000 > Commit: Konstantin Belousov <kib@FreeBSD.org> > CommitDate: 2024-02-11 01:54:11 +0000 > > aio_read2/aio_write2: add AIO_OP2_VECTORED > > Suggested by: Vin=C3=ADcius dos Santos Oliveira <vini.ipsmaker@gmai= l.com> > Reviewed by: jhb > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential revision: https://reviews.freebsd.org/D43448 > --- > lib/libc/gen/aio_read2.c | 4 +++- > lib/libc/gen/aio_write2.c | 4 +++- > sys/sys/aio.h | 1 + > 3 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/lib/libc/gen/aio_read2.c b/lib/libc/gen/aio_read2.c > index 3a783e1b1b15..a5186d509b26 100644 > --- a/lib/libc/gen/aio_read2.c > +++ b/lib/libc/gen/aio_read2.c > @@ -37,13 +37,15 @@ aio_read2(struct aiocb *iocb, int flags) > { > int error; > > - if ((flags & ~(AIO_OP2_FOFFSET)) !=3D 0) { > + if ((flags & ~(AIO_OP2_FOFFSET | AIO_OP2_VECTORED)) !=3D 0) { > errno =3D EINVAL; > return (-1); > } > iocb->aio_lio_opcode =3D LIO_READ; > if ((flags & AIO_OP2_FOFFSET) !=3D 0) > iocb->aio_lio_opcode |=3D LIO_FOFFSET; > + if ((flags & AIO_OP2_VECTORED) !=3D 0) > + iocb->aio_lio_opcode |=3D LIO_VECTORED; > > error =3D lio_listio(LIO_NOWAIT, &iocb, 1, NULL); > if (error =3D=3D -1 && errno =3D=3D EIO) { > diff --git a/lib/libc/gen/aio_write2.c b/lib/libc/gen/aio_write2.c > index 8b5d4a38a6c5..8f4f6a35fd4d 100644 > --- a/lib/libc/gen/aio_write2.c > +++ b/lib/libc/gen/aio_write2.c > @@ -37,13 +37,15 @@ aio_write2(struct aiocb *iocb, int flags) > { > int error; > > - if ((flags & ~(AIO_OP2_FOFFSET)) !=3D 0) { > + if ((flags & ~(AIO_OP2_FOFFSET | AIO_OP2_VECTORED)) !=3D 0) { > errno =3D EINVAL; > return (-1); > } > iocb->aio_lio_opcode =3D LIO_WRITE; > if ((flags & AIO_OP2_FOFFSET) !=3D 0) > iocb->aio_lio_opcode |=3D LIO_FOFFSET; > + if ((flags & AIO_OP2_VECTORED) !=3D 0) > + iocb->aio_lio_opcode |=3D LIO_VECTORED; > > error =3D lio_listio(LIO_NOWAIT, &iocb, 1, NULL); > if (error =3D=3D -1 && errno =3D=3D EIO) { > diff --git a/sys/sys/aio.h b/sys/sys/aio.h > index 6680f9fed3fa..919a6180b130 100644 > --- a/sys/sys/aio.h > +++ b/sys/sys/aio.h > @@ -58,6 +58,7 @@ > /* aio_read2/aio_write2 flags */ > #if __BSD_VISIBLE > #define AIO_OP2_FOFFSET 0x00000001 > +#define AIO_OP2_VECTORED 0x00000002 > #endif > > /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2j12gi%2BJOVRLO1hXp1mfO_%2BCYQ7_GQRWopz3UKh%2ByNTcw>