From nobody Sun Feb 11 14:28:17 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TXqhJ088Dz59pxp; Sun, 11 Feb 2024 14:28:32 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-il1-f179.google.com (mail-il1-f179.google.com [209.85.166.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TXqhH4P5mz4VLZ; Sun, 11 Feb 2024 14:28:31 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-il1-f179.google.com with SMTP id e9e14a558f8ab-363ad0203c8so8761595ab.2; Sun, 11 Feb 2024 06:28:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707661709; x=1708266509; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mnK1Tlw46RpWr59jVqzTFhmndBgyxuEAclfcDhGaIPE=; b=pawTIHn7PJQy4ooVO8dntwxxUvDryKcsHn+3sRUreVDP+VqWxIG/+n2A8f+AD4l/DW B35MtcL3163Pf8b4+C83BjLUZfNMAHpa6QMgaf49m4XtJE7R1HhV0Tee1o8Fpnn5wHDm 8e6oehAJAJCtuXDZ/5nwIS/qbN0/SigTtzDfZo2gQb/iPbSlccxqb8qrB6i11CytTADT ahdOQR0vsUtcCfbSTQf6qwx+uq7L/3npIFmbmDOnYZ/NcRT+5YOK3/fq4MRp7b4Qsu4z 8F+lhUt5DimxgIW09Fjmf8qEZIyIpW2DCeyZ4r04kuJOWprVM+WdjO4iOCKDRsO7xcL7 LDpQ== X-Gm-Message-State: AOJu0Yw1UtYZe6HeJd9Kv7XwYlRhm6txIQTxSZVwrYEYCeqhwOw5OEdt RYcGT6dPT7Ria+4XlhwqRRmvFfsIPRAq7IpOKfvgkl6nX3xGf1ppvr59C5ipSr9raXCkhRlvB4q rfammS6U7/bLB5R14ojA92Z99EkWY0wh2XE4= X-Google-Smtp-Source: AGHT+IGwl8NB8kzmphziZr+QAkf3mJNT9+2HWF1CBQ247sy6xOrT3M9Am54Wln9neQpk87Fdc3b7EC+7cWhSNKfZVfo= X-Received: by 2002:a92:d9c5:0:b0:363:cbb8:53c7 with SMTP id n5-20020a92d9c5000000b00363cbb853c7mr4864401ilq.23.1707661709337; Sun, 11 Feb 2024 06:28:29 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202402110154.41B1scZ9090228@gitrepo.freebsd.org> In-Reply-To: <202402110154.41B1scZ9090228@gitrepo.freebsd.org> From: Alan Somers Date: Sun, 11 Feb 2024 07:28:17 -0700 Message-ID: Subject: Re: git: 8dfc788b8480 - main - aio_read2/aio_write2: add AIO_OP2_VECTORED To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4TXqhH4P5mz4VLZ X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated 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 wrote: > > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D8dfc788b8480a13f1f945f0a94= d8b1e327af5c6f > > commit 8dfc788b8480a13f1f945f0a94d8b1e327af5c6f > Author: Konstantin Belousov > AuthorDate: 2024-02-03 18:09:36 +0000 > Commit: Konstantin Belousov > CommitDate: 2024-02-11 01:54:11 +0000 > > aio_read2/aio_write2: add AIO_OP2_VECTORED > > Suggested by: Vin=C3=ADcius dos Santos Oliveira > 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 > > /*