Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF817C636D7 for ; Fri, 10 Feb 2023 18:20:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233043AbjBJSUM (ORCPT ); Fri, 10 Feb 2023 13:20:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232967AbjBJSUJ (ORCPT ); Fri, 10 Feb 2023 13:20:09 -0500 Received: from hr2.samba.org (hr2.samba.org [IPv6:2a01:4f8:192:486::2:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDF526A730; Fri, 10 Feb 2023 10:19:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samba.org; s=42; h=Message-ID:Cc:To:From:Date; bh=PtdWmRFylJvBmX2IAcm65PdjtLIX5BPy4K+OpONMbJI=; b=2AT85G2ey0JjUTr9HJI84ayqma 4XZmHUCPZg3Fl2G+wtQB+Icbc6Jt2jaZ3sLoRS2b5w4Zl1sGz9YxmXnMDTyq+dIUq/TjI8H/xTIVE Sg6czi6ZZNv5uqjyghLWMGc5kA/3DS1lu8szeIFtPyOZTWFYJdfOH5HZ0aHQf2BSQh1L7Es9UF4rK Rhu1HCt8YaBXwGz1UVGjotJicaZXgiPb+9Gv21BQcvX73U7I0xe5RGKzI/rsiPgcnVOeuqpIh3FZE 1XggXKiOnmf02qVQ41UJSoJqu43WulRNZbPuUt/C0U69EVz+hFDeNaOKEQx6nmjz+DAA6a9s7SE2U yK7KaKXf8Ahgv5Rx0r8MR5pxHTFAMFtOE0wyQCcAlwROCAjK/Swx4nGMbJpxyOSjuBKdoQzoR/N1q an6gQJbeDcUCp/lBRzvcHBW/iQCN8XxugIC3v79XOEU1OeAnQS3VgZgIVXS+4wyvvdMHGSwgFrmBD +zOLdhDh4PI49Jil5d5y08HQ; Received: from [127.0.0.2] (localhost [127.0.0.1]) by hr2.samba.org with esmtpsa (TLS1.3:ECDHE_SECP256R1__ECDSA_SECP256R1_SHA256__CHACHA20_POLY1305:256) (Exim) id 1pQXzo-00D2jz-UF; Fri, 10 Feb 2023 18:19:41 +0000 Date: Fri, 10 Feb 2023 10:19:36 -0800 From: Jeremy Allison To: Andy Lutomirski Cc: Linus Torvalds , Jens Axboe , Linux API Mailing List , Dave Chinner , "linux-kernel@vger.kernel.org" , Matthew Wilcox , Stefan Metzmacher , Al Viro , linux-fsdevel , Samba Technical , io-uring Subject: Re: copy on write for splice() from file to pipe? Message-ID: Reply-To: Jeremy Allison References: <0cfd9f02-dea7-90e2-e932-c8129b6013c7@samba.org> <20230210021603.GA2825702@dread.disaster.area> <20230210040626.GB2825702@dread.disaster.area> <20230210065747.GD2825702@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 10, 2023 at 09:57:20AM -0800, Andy Lutomirski via samba-technical wrote: > >(And if Samba needs to make sure that future writes don't change the >outgoing data even two seconds later when the data has been sent but >not acked, then maybe a fancy API could be added to help, or maybe >Samba shouldn't be using zero copy IO in the first place!) Samba doesn't need any of this. The simplest thing to do is to restrict splice-based zero-copy IO to files leased by a single client, where exclusive access to changes is controled by the client redirector.