Message ID | 9910c8026500ba43f3d93e66e822ae64980d9527.1697486714.git.nabijaczleweli@nabijaczleweli.xyz |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp3711484vqb; Mon, 16 Oct 2023 13:36:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHuFG7aBjBsTf9q0RhHrcz39IbhFCDd365oND0g4z3z4xwiNhyOjdA7FflezYS+Lkv3ubKq X-Received: by 2002:a17:903:290c:b0:1c6:2902:24f9 with SMTP id lh12-20020a170903290c00b001c6290224f9mr424591plb.1.1697488565045; Mon, 16 Oct 2023 13:36:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697488565; cv=none; d=google.com; s=arc-20160816; b=A2Xcgg+vswBpKvnbT90jOvQcNiVkLjBAGwK8/FV3qcOAWLmZyn50RW4wqelxhqN277 YTdUFzQOkUrPigdK5vNfjU6qHRx7qkY6Lo0caUTYDBvQ7POv9zU9ptPFUcxfQpAMzMLU /T1bLUVSuADtpDdnBGBuz7i7TDHKEn8KhhMZaOmlFZzUs21MTpyeN1qDf57CEDD8zpA9 VQqNZJ1LMNtbBVn0iKShxkbrsc2qMBlP4RfRQSxxbpCUs65qljhTcHGu7v8Js26BjhwF GCf8fQQJl0O4PKXVlbSsGJeup4h01RRSS+QXkfkoNLlQPiEHzI0GxTQq3CQVdJOhd6qX BA8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:from:date :dkim-signature; bh=LUkO08QFdMGYAkxVRZn7tBXVRIVroY00ER7dOpVVwWs=; fh=Oskmylf92gQgoWcJVK2DZkdbYki3SlnV/gEzpmChMXQ=; b=kHAYNZ6IPr0Z8ntegZEUwZVCguRg+AFTRfT2EVSE6Yif6UHuWuk7AQa48kqSCIlgoT AYEQkjLmDeVGTk8Lmb731ovC4+taJw/RCjU7Wxj3iabUguchktdBhfrbDew5WdxyXrSb E/dSsxRagVTwSa6ct5U/izh7gCUexHl1Fqw9VTHYjeki7MK4nQimlXkJAucRge0SNz+W Z8PzpPVKjX6Fgy/MMjFFeW84fiQseka7jNkbze3bzxbPOQoVxsfWgCnA1nqfK7PZMgGQ Ow82bQ8bIjL/ig+voYDQLaDacCh10IXNPhmfWYnEll2i4jP95MZi8YsOgzrNtQpMO77z OkAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=C90GcxUM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id f15-20020a170902684f00b001c46467a211si105282pln.193.2023.10.16.13.36.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 13:36:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=C90GcxUM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id D0DD18041C17; Mon, 16 Oct 2023 13:35:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234170AbjJPUfs (ORCPT <rfc822;hjfbswb@gmail.com> + 18 others); Mon, 16 Oct 2023 16:35:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233280AbjJPUfo (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 16 Oct 2023 16:35:44 -0400 Received: from tarta.nabijaczleweli.xyz (tarta.nabijaczleweli.xyz [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12A5F103; Mon, 16 Oct 2023 13:35:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1697488537; bh=Alm3zmAVynjk8wk0prJ+3hHGU0F6PYlx1LJH0af40nw=; h=Date:From:Cc:Subject:References:In-Reply-To:From; b=C90GcxUM6lHvAoH/AV87Tw0bEuMMpniry7O2C1sQXd2Ss0UcHJDrMIz+A0VTmZ4+i WrM1fIAWn3ZGFsHF+CG7BRXBXoV/cB/OTlCrlqyfioSxLmDK4xXrwGWi0+rsry14AH otEtVRC4SPvlxKLDqTtwwwmtqFWSL7aWEnVTbdJ7K5vdxyoEX3iJFY4iQtA4RqqQzi c6hhcKuoUx7aHL7GoJYj1oMcBpDBRwmkkGTDqrjd2YGBLtY069IrnDwj+eQwu4Jn9+ bs0v1rDRKY5BuMIHAkjGE8L0/VsvX2nZ95w9uoXb6Yx1CFK6QJIGp1/34899mmG9iG RHHBFrY5ounbg== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 3EADA10406; Mon, 16 Oct 2023 22:35:37 +0200 (CEST) Date: Mon, 16 Oct 2023 22:35:37 +0200 From: Ahelenia =?utf-8?q?Ziemia=C5=84ska?= <nabijaczleweli@nabijaczleweli.xyz> Cc: Alexander Viro <viro@zeniv.linux.org.uk>, Christian Brauner <brauner@kernel.org>, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/11] splice: copy_splice_read: do the I/O with IOCB_NOWAIT Message-ID: <9910c8026500ba43f3d93e66e822ae64980d9527.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> References: <cover.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="26wv7mk76hokbeym" Content-Disposition: inline In-Reply-To: <cover.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> User-Agent: NeoMutt/20231006 X-Spam-Status: No, score=-0.8 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 pete.vger.email To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 16 Oct 2023 13:35:59 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779945769419789839 X-GMAIL-MSGID: 1779945769419789839 |
Series |
splice(file<>pipe) I/O on file as-if O_NONBLOCK
|
|
Commit Message
Ahelenia Ziemiańska
Oct. 16, 2023, 8:35 p.m. UTC
Otherwise we risk sleeping with the pipe locked for indeterminate
lengths of time.
Link: https://lore.kernel.org/linux-fsdevel/qk6hjuam54khlaikf2ssom6custxf5is2ekkaequf4hvode3ls@zgf7j5j4ubvw/t/#u
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
---
fs/splice.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/splice.c b/fs/splice.c index d983d375ff11..9d29664f23ee 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -361,6 +361,7 @@ ssize_t copy_splice_read(struct file *in, loff_t *ppos, iov_iter_bvec(&to, ITER_DEST, bv, npages, len); init_sync_kiocb(&kiocb, in); kiocb.ki_pos = *ppos; + kiocb.ki_flags |= IOCB_NOWAIT; ret = call_read_iter(in, &kiocb, &to); if (ret > 0) {