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 02929C05027 for ; Fri, 10 Feb 2023 22:35:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233800AbjBJWfe (ORCPT ); Fri, 10 Feb 2023 17:35:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233313AbjBJWfd (ORCPT ); Fri, 10 Feb 2023 17:35:33 -0500 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E40F91733 for ; Fri, 10 Feb 2023 14:35:31 -0800 (PST) Received: by mail-ej1-x635.google.com with SMTP id c26so14662977ejz.10 for ; Fri, 10 Feb 2023 14:35:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=sgPQEqmErKQB0wG6VWCF+VmnzkMKfRqkz/sIKfZqL68=; b=gQz1/9xmHREGXPA2JXH0RsK7JsUhn7vHa15D/69fCSK/vZzwlw4bq85T8mRYkpJplP EegJvrfeGBLxDkz18RvpvK6JB/6GDTuCoFw9pDlWGUVTnbp7FP4QCEiSxJ0txMWl8p8y bbKRpYKHkKD8w9mPOUGxJllCwuJhuHiNZ3ZP0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=sgPQEqmErKQB0wG6VWCF+VmnzkMKfRqkz/sIKfZqL68=; b=WvxUZSmRolni187rVH+bFE09EBKunEJvwFAcioC+gjnufpiF+wIup1lOvwq/hXdWK7 GXWK3i092UXdsoTur+Ib0RMvJgBxvhLT0ip22WSgibr7KywsRQbmXwrzCzkS6hMBhODw V+ZD4a+/k2T2aKWuf1UKWan72zPAQTc2gRodA0m0e9FadE+HXDJ8R638qmJJAu74PITM X4F0eR5QNj3B7eRRcpX6QbrVdUZlwuNnQLc8TNdlB+qPKU8TCbV5JhnF1Q/Su8YMDMjP 0qYbB2is66EcvHKKgCRmSzVXDnKeHWgoeI6Xu/QBid5R1uEyvimiq8+HSy3IOePH2+FJ MU/Q== X-Gm-Message-State: AO0yUKXaBRqOD6WvP9WPI30p44lYA9B/0sNfMkByrfCaiiXX9wacygZr 1mvdxYXY9rIEIPdP7o4nyjXf3LOqy5qFcZ3rmmE= X-Google-Smtp-Source: AK7set/oZjYHSglv1w1zsg9/zGr8Yk1ab14OzEZ5laWWGt0vgKpWhZvX6qy6nUWoAMIb7JT/4sq0SA== X-Received: by 2002:a17:907:62a1:b0:86f:64bb:47eb with SMTP id nd33-20020a17090762a100b0086f64bb47ebmr23923441ejc.3.1676068530130; Fri, 10 Feb 2023 14:35:30 -0800 (PST) Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com. [209.85.218.48]) by smtp.gmail.com with ESMTPSA id h7-20020a170906584700b008a9e585786dsm2946030ejs.64.2023.02.10.14.35.29 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Feb 2023 14:35:29 -0800 (PST) Received: by mail-ej1-f48.google.com with SMTP id jg8so19454038ejc.6 for ; Fri, 10 Feb 2023 14:35:29 -0800 (PST) X-Received: by 2002:a17:906:fad2:b0:88d:d304:3424 with SMTP id lu18-20020a170906fad200b0088dd3043424mr1693934ejb.0.1676068528950; Fri, 10 Feb 2023 14:35:28 -0800 (PST) MIME-Version: 1.0 References: <0cfd9f02-dea7-90e2-e932-c8129b6013c7@samba.org> <1dd85095-c18c-ed3e-38b7-02f4d13d9bd6@kernel.dk> <7a2e5b7f-c213-09ff-ef35-d6c2967b31a7@kernel.dk> <2bb12591-9d24-6b26-178f-05e939bf3251@kernel.dk> <824fa356-7d6e-6733-8848-ab84d850c27a@kernel.dk> In-Reply-To: <824fa356-7d6e-6733-8848-ab84d850c27a@kernel.dk> From: Linus Torvalds Date: Fri, 10 Feb 2023 14:35:11 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: copy on write for splice() from file to pipe? To: Jens Axboe Cc: Ming Lei , Andy Lutomirski , Dave Chinner , Matthew Wilcox , Stefan Metzmacher , linux-fsdevel , Linux API Mailing List , io-uring , "linux-kernel@vger.kernel.org" , Al Viro , Samba Technical Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Fri, Feb 10, 2023 at 2:26 PM Jens Axboe wrote: > > > > (I actually suspect that /dev/zero no longer works as a splice source, > > since we disabled the whole "fall back to regular IO" that Christoph > > did in 36e2c7421f02 "fs: don't allow splice read/write without > > explicit ops"). > > Yet another one... Since it has a read_iter, should be fixable with just > adding the generic splice_read. I actually very consciously did *not* want to add cases of generic_splice_read() "just because we can". I've been on a "let's minimize the reach of splice" thing for a while. I really loved Christoph's patches, even if I may not have been hugely vocal about it. His getting rid of set/get_fs() got rid of a *lot* of splice pain. And rather than try to make everything work with splice that used to work just because it fell back on read/write, I was waiting for actual regression reports. Even when splice fails, a lot of user space then falls back on read/write, and unless there is some really fundamental reason not to, I think that's always the right thing to do. So we do have a number of "add splice_write/splice_read" commits, but they are hopefully all the result of people actually noticing breakage. You can do git log --grep=36e2c7421f02 to see at least some of them, and I really don't want to see them without a "Reported-by" and an actual issue. Exactly because I'm not all that enamoured with splice any more. Linus