Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1996466rdh; Tue, 26 Sep 2023 09:13:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHvbNw8rgG99FsELLnw3gaTWa4L14xjqPrqxGffHFUPchpLoeiGEzk+HkDOO1hBs3Ox/PZi X-Received: by 2002:a17:90a:dd95:b0:274:6a79:17c1 with SMTP id l21-20020a17090add9500b002746a7917c1mr9364847pjv.15.1695744831390; Tue, 26 Sep 2023 09:13:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695744831; cv=none; d=google.com; s=arc-20160816; b=lvzlQ70V3F4RDoMbTrx/y6PEStfhducnkOxS2QjfTLQJKzTtOvtHy834yWVuskWzJY D38mOaO2oub8hcK7cHKPN9nh8vdd7zcciEQA8EPgL0fIwzb8zpGcNj+M+cUgnV/2dgQ5 R5/U141k9SMBIP92egPEsbauUGTlzVePbvgMKceUbkkleScYRN0NglEuEjywluQy3Soc B2sEBPAD4n6d7NLyLNC9ETupO7e8lW8AlEhe3O8FjCEieVYufU7b+pwNzKdTBudy7i6k +3eobkQmNSvFNQpSg1ZcOFly+9KOcphfbCup5JB/7Su0i5S5Mu6NpB3WbubFSGPfP4Uv WWxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ptamfMpXoJ3CODle1KvFafVhoHAycVMWOruc5QELg+E=; fh=dRfzida3nps+qLHWRAEmu/22J2CisFryXKFoMU0NiWg=; b=swByTQIf6+JEBEKLU4B9VVXcR/HevJHMbCAgvY+V2y8/PJFoUQwf63k98qW6Gzjcs0 qXi/ITI3LX79DqeMSSkniMlIfR6eABLdFx1jKxFCAwCIVFK6eOSBiJJLOsmi+WlMBMBG pMxJQA/YxtiE3TqocCnadgdpOS+r6qIHCrPYg4oE8qF8i7bNdxniDRTOw9NNWkWSFHIL dHpQgj6uv0n8Pz07iei+9RfHzUgSNUP45hOCZ6ky9fXdxLzpIdbldIeLzllLNfC0ECfn nPUxK8TwEC9vOwWRWwMr+whxIJFc2i/EJoRiY8jUb2zzzjvbmInCcrDZFBKUDFWE6fyQ YZHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=gFiLzWvg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id pf17-20020a17090b1d9100b00277387ac962si8318214pjb.2.2023.09.26.09.13.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 09:13:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=gFiLzWvg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 61C2F801C4AF; Tue, 26 Sep 2023 06:43:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234848AbjIZNnw (ORCPT + 99 others); Tue, 26 Sep 2023 09:43:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234846AbjIZNnv (ORCPT ); Tue, 26 Sep 2023 09:43:51 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE933F3 for ; Tue, 26 Sep 2023 06:43:43 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-32333fb6beeso1802381f8f.0 for ; Tue, 26 Sep 2023 06:43:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1695735822; x=1696340622; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ptamfMpXoJ3CODle1KvFafVhoHAycVMWOruc5QELg+E=; b=gFiLzWvgNJVmF699Cqrqu4+R2LyjPqbMaVQK71IZzRhA9854OzKw8FWriPbCA9+3vO TarL1CLrD40m57jQTX6e/RfvM6lz9fmFOdcAF17Eny5ebKgRpXXkc70dBGroWQZLvFMI cl1mZrrM6pQ28VKoy6qf92BAmSUhUeBM5inzsfXi0NgqhNGutAqkC3qhTwy+yKp49Ows tPaIFQPEbBcpMRN7unIsY8pb4bjZwAwhM7IAQyaAbA65mBPf2C0hq7ij3nMpKlIP77fg a2LJTbE9DD0HgA7tcrb+6R2vnfzvjl+SQZLopnrItRI5hUvPRxFmVasvuoIKqqrloi37 eDaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695735822; x=1696340622; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ptamfMpXoJ3CODle1KvFafVhoHAycVMWOruc5QELg+E=; b=s5AFdI4WSRH7iwyDRLgXb7p1l5VEyGDRLpKqX5KecByew4X7mdmEyFr9J0r1EwUtd+ OHRKBfnKh/zQlQQuJAj7O6jwyZRQY0EkmYTioHVblblnxJegK6+9JI0GndJF7LtFqCaS bvXFqhqwMxYVsKEnBH3qyogEkOcgk7Zc/a7XFbj11tT1Oiut/FZrMbceFjAtbNtvvuCh W8LFIqbRQgXmhhfgOkVnpBKvY1AuDp8YR/fGEEs3ggh6pr9vWd+1rtSAT1mDJg3DrThE asWlij31v8qp7EHRm6xEl5sMA9CnFaX4i5s5nW7G0wGEO8zKg85+5TTQtET7PPx16TXC 5DSA== X-Gm-Message-State: AOJu0YxEXteohTvPDXU+tJiyGIOGb2lXw+865rpPNDkUaUOhj2raUaXP GgzhTZV9WU5AHI1HloUqo6U5d2L62EcUXVILFpQ= X-Received: by 2002:adf:ed0d:0:b0:315:9676:c360 with SMTP id a13-20020adfed0d000000b003159676c360mr8793528wro.25.1695735822316; Tue, 26 Sep 2023 06:43:42 -0700 (PDT) Received: from heron.intern.cm-ag (p200300dc6f49a600529a4cfffe3dd983.dip0.t-ipconnect.de. [2003:dc:6f49:a600:529a:4cff:fe3d:d983]) by smtp.gmail.com with ESMTPSA id o13-20020a5d474d000000b003217cbab88bsm14644490wrs.16.2023.09.26.06.43.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 06:43:41 -0700 (PDT) From: Max Kellermann To: alx@kernel.org, linux-man@vger.kernel.org, brauner@kernel.org, axboe@kernel.dk Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, libc-alpha@sourceware.org, Max Kellermann Subject: [PATCH v2] man2/splice.2: document SPLICE_F_NOWAIT Date: Tue, 26 Sep 2023 15:43:39 +0200 Message-Id: <20230926134339.2919289-1-max.kellermann@ionos.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 26 Sep 2023 06:43:54 -0700 (PDT) Patch for SPLICE_F_NOWAIT submitted to LKML: https://lore.kernel.org/lkml/20230926063609.2451260-1-max.kellermann@ionos.com/ In the HISTORY section, I declared Linux 6.7 as the first version to have this feature, but this is only speculation, because SPLICE_F_NOWAIT is still under discussion and has not yet been merged. Signed-off-by: Max Kellermann --- man2/splice.2 | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/man2/splice.2 b/man2/splice.2 index e9a18e668..a07c001ac 100644 --- a/man2/splice.2 +++ b/man2/splice.2 @@ -89,13 +89,26 @@ call); in the future, a correct implementation may be restored. .TP .B SPLICE_F_NONBLOCK -Do not block on I/O. +Do not block on I/O on pipes. This makes the splice pipe operations nonblocking, but .BR splice () may nevertheless block because the file descriptors that are spliced to/from may block (unless they have the .B O_NONBLOCK -flag set). +flag set or +.B SPLICE_F_NOWAIT +is specified). +.TP +.B SPLICE_F_NOWAIT +If no data is immediately available on +.I fd_in +and it is not a pipe, do not wait (e.g. for backing storage or locks), +but return immediately with +.B EAGAIN. +This is analogous to the +.B RWF_NOWAIT +flag of +.BR preadv2 (). .TP .B SPLICE_F_MORE More data will be coming in a subsequent splice. @@ -138,6 +151,8 @@ is set to indicate the error. .TP .B EAGAIN .B SPLICE_F_NONBLOCK +or +.B SPLICE_F_NOWAIT was specified in .I flags or one of the file descriptors had been marked as nonblocking @@ -192,6 +207,9 @@ was required to be a pipe. Since Linux 2.6.31, .\" commit 7c77f0b3f9208c339a4b40737bb2cb0f0319bb8d both arguments may refer to pipes. +.PP +.B SPLICE_F_NOWAIT +was added in Linux 6.7. .SH NOTES The three system calls .BR splice (), -- 2.39.2