From mboxrd@z Thu Jan 1 00:00:00 1970 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 6B7AAC05027 for ; Fri, 10 Feb 2023 19:30:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232762AbjBJTaQ (ORCPT ); Fri, 10 Feb 2023 14:30:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232968AbjBJTaB (ORCPT ); Fri, 10 Feb 2023 14:30:01 -0500 Received: from hr2.samba.org (hr2.samba.org [IPv6:2a01:4f8:192:486::2:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEF8B7D8BD; Fri, 10 Feb 2023 11:29:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samba.org; s=42; h=From:Cc:To:Date:Message-ID; bh=sdohRzqa5d1KLw/5QlsnlVMZyzj35/qmiKMTCHFuH20=; b=HcdiNnpTWGBgIXzMc4dlptDa9r gsriTjRTC8qzHAliSS/bYM/Y68q/ZzYPhjn/D9AHo1aSZhb8utKqTxVIIU5AJ9IDHhc8EKO2T1jfP gf49dCAvreG5hYSri4VdX35lRB4sba8riVLZYQPdWilPuBcylZkI0yDJmr64C4/o/QngrQe/Ua+RB Xmt0hxeyZjH43pu7MxIZHQ8xhmWZKkt7tgvL1bhfpFTmV8joetZC1mwiF+/45UIfZV09u5KmQszeC ZXIEPqeDOt302HrExWji+LR3ZyWLifhUfUmKv9JacDrMumMNhVHllXdv1nit3fusB1o8KzmylEldl rlVFuVtCtgXRCUnQCr3VSJzsdzWNZSuOWY6SwEdCB/M84mvJS0ZJcq8wSN5f7qPRQq/tOf+4QPsHS tL0aUjbK4AVIxLxlUQsx4HTayxk6BOPBk+JJA1Od2MuWrVgR1Ks87cmKlmBBDERlBi3+iroDo0Y4x d/D2vW8XU7KpWsF0CdL+yqmW; 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 1pQZ5p-00D3LZ-QD; Fri, 10 Feb 2023 19:29:57 +0000 Message-ID: Date: Fri, 10 Feb 2023 20:29:57 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: copy on write for splice() from file to pipe? Content-Language: en-US To: Jeremy Allison , Andy Lutomirski Cc: Linus Torvalds , Jens Axboe , Linux API Mailing List , Dave Chinner , "linux-kernel@vger.kernel.org" , Matthew Wilcox , Al Viro , linux-fsdevel , Samba Technical , io-uring References: <0cfd9f02-dea7-90e2-e932-c8129b6013c7@samba.org> <20230210021603.GA2825702@dread.disaster.area> <20230210040626.GB2825702@dread.disaster.area> <20230210065747.GD2825702@dread.disaster.area> From: Stefan Metzmacher In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org Am 10.02.23 um 19:19 schrieb Jeremy Allison: > 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. Yes, I guess we can use it if the file is read-only (from it's acls), or when the client has a read lease. And of course we can have an I don't care option, maybe reusing 'use sendfile = yes' as that has the same problem in the existing code already. metze