From nobody Sun Feb 11 01:54:38 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 4TXVyQ6MZXz596gV; Sun, 11 Feb 2024 01:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TXVyQ47lPz4B1k; Sun, 11 Feb 2024 01:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707616478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yz1DzPh7DlxAg4wGPRVE/s8oAvoi0SbkXSQryzmJbBg=; b=dSKZWMrQovPS11fXJxNt4yk5HVyIChrh1xnkZXgVOvoqqjgQ/JeeuMTnPgfBn20YkXbFMN /g5TUP+Z9gnW9R0Rq2t354PoOpb83EFn0Ey5JmNWCNk1dju6WSHob24C9lSCXwBqCNsKvj ESOYnCsBeVRHHwl09qxVkG+cObrwAnXkIW3ElHaT4UNAE76WqhjUoeVozsftg2oUpJoIsE oj4HJENWsSgp/NeoeX1+lNpScQ+Wl4CcQnvuLi8y3TYP6uVk1X+RymrHAefJXckb0osK38 03g4Fmi9W/3jHImRkLYQIweJWZJo9rVVoEsAC/Xjvl3P21AZSswwqLqI1Um84Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707616478; a=rsa-sha256; cv=none; b=j9mo9fB4Q8KgdVhApq0GVqA3UsI6lHOTdTogg+niWZnzpSAleLOQoqzeesik6KnSymu3fm H5eudQnKMI0xk3NhoL864KdOLZgPirLl6sx/6J+VgVFTCoDmvdvbS3DhlDtFVcrlNf60RP QciNTmJfKjtzRo57GQhWaTA1ADgVM6gzgyANp0zsBnoiV3LyLK3tRBTMuI0A+7zxIZyQUi wHT34rppvNLv0nCKD+tkrNBnyTnMsPLPO/2N0h+TKmbOEtXby+6keFCuN0Sd81Z23/w8w8 QYj/c4SNO5JfbQ/o0Sg5hB5tN2HwiybtJtTkUqWjnpOeqCQuiUw1hsVH27vwPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707616478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yz1DzPh7DlxAg4wGPRVE/s8oAvoi0SbkXSQryzmJbBg=; b=Nh/tp5lKdjSexeUOXWZsT51QxcSnMzc1z7fHcBHDa7vn2d40WabcrHV0Z3X8i37PBEYgax 0veqNfQJEj7n5MNw5JQDBTN0rmC80wABzWMPupgoXbt33E4b9i0N93zLKvRgj3eCKNRDaO gm94xCiiPWKFf2bFEdTGZZHLzqEA2Eaf0BaYNN14Le9HdvzcNvuRu+t6IXdTiG7ywnww6q M9qBechv2+BTodXREGYnrTV6I2yGmqT4Mh5tb5V1lJxcsGDkb/WyvQREYEWJD4vgdN+rdE 0J7nM7WYZmRtYGljkyHMN45hA0yZt6uBvB4+MldZJK3XVi2UiO2G37PdMs1KvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TXVyQ32gfzgjw; Sun, 11 Feb 2024 01:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41B1scAk090231; Sun, 11 Feb 2024 01:54:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41B1scZ9090228; Sun, 11 Feb 2024 01:54:38 GMT (envelope-from git) Date: Sun, 11 Feb 2024 01:54:38 GMT Message-Id: <202402110154.41B1scZ9090228@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 8dfc788b8480 - main - aio_read2/aio_write2: add AIO_OP2_VECTORED 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8dfc788b8480a13f1f945f0a94d8b1e327af5c6f Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8dfc788b8480a13f1f945f0a94d8b1e327af5c6f 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ícius 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)) != 0) { + if ((flags & ~(AIO_OP2_FOFFSET | AIO_OP2_VECTORED)) != 0) { errno = EINVAL; return (-1); } iocb->aio_lio_opcode = LIO_READ; if ((flags & AIO_OP2_FOFFSET) != 0) iocb->aio_lio_opcode |= LIO_FOFFSET; + if ((flags & AIO_OP2_VECTORED) != 0) + iocb->aio_lio_opcode |= LIO_VECTORED; error = lio_listio(LIO_NOWAIT, &iocb, 1, NULL); if (error == -1 && errno == 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)) != 0) { + if ((flags & ~(AIO_OP2_FOFFSET | AIO_OP2_VECTORED)) != 0) { errno = EINVAL; return (-1); } iocb->aio_lio_opcode = LIO_WRITE; if ((flags & AIO_OP2_FOFFSET) != 0) iocb->aio_lio_opcode |= LIO_FOFFSET; + if ((flags & AIO_OP2_VECTORED) != 0) + iocb->aio_lio_opcode |= LIO_VECTORED; error = lio_listio(LIO_NOWAIT, &iocb, 1, NULL); if (error == -1 && errno == 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 /*