Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp3193118rwo; Mon, 24 Jul 2023 07:35:21 -0700 (PDT) X-Google-Smtp-Source: APBJJlGXc20S8vdj/81XVd/T1w9dExCsHfvq2vWDbDh3iVx7MdXidHsMYD9U72kHqgTk4ZBcwU4B X-Received: by 2002:a05:6358:910:b0:137:d0bb:5c31 with SMTP id r16-20020a056358091000b00137d0bb5c31mr6131284rwi.7.1690209321174; Mon, 24 Jul 2023 07:35:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690209321; cv=none; d=google.com; s=arc-20160816; b=naq5ph2v1S7W1JwBYSDRl7eNwYNaQBJi2K3mNXcdl/MW4ozmW6apm3yTY3Sip0Hr/K ys9Wun3R1/7Q77+KG7QMouddDHx+Mk0qiYqqLtQ+DwEJSb3j0Xp6xOgjjLuGr1qDg63k NpA17OpT/BJSNRHrLL81YUEUJOuun4r2ACfstWsgwsoYTshk3gF68G1DBOTC5+JYtwn7 BzTm4yTEWHUxz8RjFOlnhw/GfU2UrDsn11wLJRkOs09ilYcDIZ7Xr7IfT2rW+4KEutSM 7Ns0Xp+S1s/tcUyrJpa770mUFIFZdZ7HNOz7SryxZMcOkxhu4Z+fA25IqoUseu039AmC J4lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=cLuBTJcHgRw5Dz5uIr7zOsQg7JkLL64F6mhAMmK/Urg=; fh=KqIuSI32mOG77znKx8qigUakDgPZzjqKxkd7nxk75pw=; b=FXxrBIBZ7FOEUNZHRpCj/7lbpvuhA73gcR4ItBwmc1fyb0tl2x2IT9G6nGXXCqrD0d pX3yw5vYyddfV6AuVqtPrmBf3bv6DDaG6K/WF54Voevu0tlezLrErLDeZ1nQPtjjuj12 4IVxZOCDlJbmZj2zy/WU6b2UC0wyFjbhoFgQDh0b2dQcWK2gPWVSessJRjLlEA4LxL+i X2+4Ke2A0FbAHv2sWGmluGNrCs/W+hy7ZCwcYO0rDRojJaQceQoZ2s60wPS3ShvKc9jH 1EFEjP1JVTa48M3LczHbCReI9iRyyKxyAcafvZAIyoOjYB4GBVFese/KlfQ8VrCrC5ph wL+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b=gvHlyPxp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w20-20020a63af14000000b0055395ce5ba7si2515138pge.571.2023.07.24.07.35.08; Mon, 24 Jul 2023 07:35:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b=gvHlyPxp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230022AbjGXN4l (ORCPT + 99 others); Mon, 24 Jul 2023 09:56:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230456AbjGXN4X (ORCPT ); Mon, 24 Jul 2023 09:56:23 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F05D1FD0 for ; Mon, 24 Jul 2023 06:55:35 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-4fa48b5dc2eso6531135e87.1 for ; Mon, 24 Jul 2023 06:55:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; t=1690206933; x=1690811733; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=cLuBTJcHgRw5Dz5uIr7zOsQg7JkLL64F6mhAMmK/Urg=; b=gvHlyPxpUKDXveeruAvPPnL2uwW7r0Lm6j/W1meQaI6mI9bctOF+FA+qn05a9Sgtx6 YLUJNCG7B6Bg6YnKGdq4BjFBF218V2BzeuKMNMBnLqM1NwslZsz/em1+PzKJfEko3N5D Ki+Xww/RrchuUj/d3YykuEcicj0QjNcfotE4c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690206933; x=1690811733; h=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=cLuBTJcHgRw5Dz5uIr7zOsQg7JkLL64F6mhAMmK/Urg=; b=CMog0d5t9MuE7TZbH9MoqTXfo5XAXu9bHeb4oQc+97GzX7YNMvdyzjTuJJwfBYMR1l 2nu6SRGHMscR37s61NVMch5mwUuCdvqn3rYEypeh/vj5yW9Erj5+u8FtBL1XSHxDPQ63 YMhcbKVDU7dqyaTz4EXxT5QezIVp5QRu1CNkRY4DriLrp1ZSxsNDkFAEZdVF6ersxLDc sPlE5QTqTUGU0mKpjDKhfpwDwb/ID1a1BImtJq0BZ9PUFn2/Z2I3tjxWXyZ76G66LuFg KWMvFljbmUJcllIWmUhHALkK+opLcIiKmgQCu/Z1RPzyTnI3NOrHQ8yEn/DPeVc0Yx3D 9FjQ== X-Gm-Message-State: ABy/qLZNe2OJpvTFImCPkcvodoy7SKHR+xmHUCmecfKnyoUua6/LO6zA CB4ReIy7lJqsamentD2ydKEabkPC2AVcGeFnFXfKaw== X-Received: by 2002:a05:6512:234c:b0:4fa:5255:4fa3 with SMTP id p12-20020a056512234c00b004fa52554fa3mr6246134lfu.5.1690206933287; Mon, 24 Jul 2023 06:55:33 -0700 (PDT) MIME-Version: 1.0 References: <20230629155433.4170837-1-dhowells@redhat.com> <20230629155433.4170837-2-dhowells@redhat.com> <63041.1690191864@warthog.procyon.org.uk> In-Reply-To: <63041.1690191864@warthog.procyon.org.uk> From: Miklos Szeredi Date: Mon, 24 Jul 2023 15:55:21 +0200 Message-ID: Subject: Re: [RFC PATCH 1/4] splice: Fix corruption of spliced data after splice() returns To: David Howells Cc: Linus Torvalds , Matthew Wilcox , Matt Whitlock , netdev@vger.kernel.org, Dave Chinner , Jens Axboe , linux-fsdevel@kvack.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Christoph Hellwig , linux-fsdevel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 24 Jul 2023 at 11:44, David Howells wrote: > > Linus Torvalds wrote: > > > > So what's the API that provides the semantics of _copying_? > > > > It's called "read()" and "write()". > > What about copy_file_range()? That seems to fall back to splicing if not > directly implemented by the filesystem. It looks like the manpage for that > needs updating too - or should that actually copy? Both source and destination of copy_file_range() are regular files and do_splice_direct() is basically equivalent to write(dest, mmap of source), no refd buffers remain beyond the end of the syscall. What is it that should be updated in the manpage? Thanks, Miklos