From patchwork Thu Dec 14 18:44:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ahelenia_Ziemia=C5=84ska?= X-Patchwork-Id: 178869 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp8767176dys; Thu, 14 Dec 2023 10:45:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IE/df7nj1QAvhrh/QlZne59Hugm67rgbUawa0iyKCwn1qsuFDiUiSGoK94xzow996XPITgx X-Received: by 2002:a05:6a21:148d:b0:18f:e0f1:5546 with SMTP id od13-20020a056a21148d00b0018fe0f15546mr11588899pzb.47.1702579505204; Thu, 14 Dec 2023 10:45:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702579505; cv=none; d=google.com; s=arc-20160816; b=R0JQKJuP0KVLGReHEOt6HXxfsdMvp+LLbTPuvvM4t/u51rXrlrTvZNOVH7soohUjbg Wt5c1VSFRm+1mzcfgkzHSSk1Z9rqSfFJ62Y3eiIc+m8rCvRHUEkSAt5XpTUtKFAINg7O zwfbLpaSteL2pDnVO4VLlr4j99e9Eq6RJ4HWyulnQcpcJNKbkAW6wBea901LSOHmaiOg YEejsfrMtPOdZ2QnFW+M0Xo+O5+h7tPepNQtQ8youG9DOt/t9J2eSbKdcRKHVBDepjJX 2awLEK4IzJB/gnr2w1qiY0bsZKlmzvxpXhjpMLTsnLitEd0RCzuAdd6qAykYX2F8JKVJ orJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:in-reply-to:content-disposition:mime-version :references:user-agent:message-id:subject:cc:from:date :dkim-signature; bh=8ZpPb+5TBN0CJwomQ2qt50QrMAYOo6I2s3elnG/iSAg=; fh=F3CYGF5tLt2QRCGz6RnC5dSNkSKVVQOih9/vnGahG3Q=; b=JBav3yezmjShS1lGagVUGXG8e6e+/dqEq51x63uNwnWfs92znxYYRL2klJiDCMNlzG Rg2mevFYTdVPYT/vv5Vhw55v+Jxuaq/wdB5UrrqCctXY8E/8wjnIhjBY+9jlc2RuP/gN j472hLqkiWlCpktY8xwA6pw4FNZOzqqDh5QBUCUegTr+zU/bUQWPbj7shL591Ocv/v/S S/SHxjj2MATdZhd7KeJ1dXHMgN+sat/HIcPjzexo96/UOebqyschxTvs6WF4eio6mfrH WrbYwxDaqxBpuElg4EZqnqujij4jz06oM6uAjIhghQYLshQcH5ltWzGo0uK7vcYESJzL WR7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=cUjT6n4a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id c22-20020a63da16000000b005c1b2d6aa3esi11446867pgh.355.2023.12.14.10.45.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 10:45:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=cUjT6n4a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id EBA13833AB16; Thu, 14 Dec 2023 10:45:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573124AbjLNSou (ORCPT + 99 others); Thu, 14 Dec 2023 13:44:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230159AbjLNSoq (ORCPT ); Thu, 14 Dec 2023 13:44:46 -0500 Received: from tarta.nabijaczleweli.xyz (tarta.nabijaczleweli.xyz [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6352410F; Thu, 14 Dec 2023 10:44:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1702579491; bh=UlbAYUhQkYFyNtJ1M2+PZCXwVifWnRc57Lf02ijgdMY=; h=Date:From:Cc:Subject:References:In-Reply-To:From; b=cUjT6n4ajxvJ/v1VnWThnKiwjlEObK2pcYGAr5kVviu4KH1rfwsRBtF02fufgtpew qGDbCXySDE/un4pSFJktXoRyyaSSnnuYx4/DDW58CqK7m2PE9MU0oLKZ0WBNmj3hk1 WSrG+632f/2WesPzL02iAqnWO0j5v2rDflkZ/FqImhywQUdVOXR2f69Bhxy+61OQX2 FQ5wz6ZrkKMfWIqtUS41h7GlS5ty7k+A9KonF54Z/l7ezA1SzhD05VmZ7I8xJp38kw Pj0MRN+L72zNTq6YX0BC83tI2ndZS7YgloxbYaoVxEb4QB2mRTLHqKS2i0Bo8w/ugY ulggTsp4x6ExQ== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 93E7713078; Thu, 14 Dec 2023 19:44:51 +0100 (CET) Date: Thu, 14 Dec 2023 19:44:51 +0100 From: Ahelenia =?utf-8?q?Ziemia=C5=84ska?= Cc: Jens Axboe , Christian Brauner , Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RERESEND 01/11] splice: copy_splice_read: do the I/O with IOCB_NOWAIT Message-ID: <29910c8026500ba43f3d93e66e822ae64980d9527.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> User-Agent: NeoMutt/20231103 References: <2cover.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <2cover.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> 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,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email To: unlisted-recipients:; (no To-header on input) 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]); Thu, 14 Dec 2023 10:45:02 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785284007288174385 X-GMAIL-MSGID: 1785284007288174385 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 --- 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) {