Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp3363493rwo; Mon, 24 Jul 2023 09:54:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlHE8Z+eQ27evakGADobesp+rHVMTcYnoGT/eBzMYwFoDNumMn0Jx6FE5mKZ+EL/oQ9wzyL4 X-Received: by 2002:a17:902:e546:b0:1bb:1523:b311 with SMTP id n6-20020a170902e54600b001bb1523b311mr9151945plf.41.1690217658536; Mon, 24 Jul 2023 09:54:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690217658; cv=none; d=google.com; s=arc-20160816; b=F/73g5sxtyHBHem/JQ8hlhDwOA7O5dS1h+AtQYIQxBoBqZyY+GEJ2onVP+WbIqoj7R E+Vg4LJ/v38fE9FQm+LJVWk4BuUCw9LO/RTd3A0LJG60oNif/rgyN1u4nBLSgcOqDUbU lZ9QFp7HbitRBoxuEmu6pJIF0NJ8YMevhv0mxtF31w3o9M7HuZaAqzgMixIxDHLVTD9D YjA5Qj0zUBkiPuPTmLORpdDHBNgdvHXwvmFEUxGtFzbTJf4MQMeYRQbowaSzVmxWkw9d SuqPc1KZRp6F4JXhFpL428SyYLIYk/d/41Mm95hE8/UB30OICOK2ofXipcTSNX8+jw4R DTIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=6vg0iHaN9wKkvivle1PI/d/JppncT2Hs9LNfF2/fAI4=; fh=oGHlEQH8wV7x5fxYSWuS+03jxzPXasOgMG0c500cmAg=; b=GvN9Ul7b45qwG0oC1cGZLimdRVEpnD34dsz6Ge7VKPK8dm3OxH5uY8PK6C0w7M0HZr rdbi2fkLoG0c2A4sowdAhcgOxONL4VGPM90PnB9cyTR6rsuI52qinT5EdsF83fY+raU1 P5oOhVZd2G9aIoI7h1a2TpbVRgdN0Ie1UJLes8cOkCfvA0WTaTsWtAFPp2SescchE1l9 i/cruDlpb+ZVtqR0s0djrWGLpIHVVUpwWfNWFLw3BW4TuYH73NpBMtQe8kEOCn5MmX/8 Psqd/7bVSRmDRMk+UDq+tnDbrhip879v9KXeRl2H6etmHcgQfJwEFSZnCujOz0XOlb+q Tugw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c13-20020a170902d48d00b001bb96a30e21si4158181plg.70.2023.07.24.09.54.06; Mon, 24 Jul 2023 09:54:18 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231356AbjGXQin (ORCPT + 99 others); Mon, 24 Jul 2023 12:38:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231260AbjGXQim (ORCPT ); Mon, 24 Jul 2023 12:38:42 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1D43125; Mon, 24 Jul 2023 09:38:41 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 9B45567373; Mon, 24 Jul 2023 18:38:38 +0200 (CEST) Date: Mon, 24 Jul 2023 18:38:38 +0200 From: Christoph Hellwig To: Dave Chinner Cc: Nitesh Shetty , Alexander Viro , Christian Brauner , hch@lst.de, gost.dev@samsung.com, Anuj Gupta , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] fs/read_write: Enable copy_file_range for block device. Message-ID: <20230724163838.GB26430@lst.de> References: <20230724060336.8939-1-nj.shetty@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,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 > > Change generic_copy_file_checks to use ->f_mapping->host for both inode_in > > and inode_out. Allow block device in generic_file_rw_checks. > > Why? copy_file_range() is for copying a range of a regular file to > another regular file - why do we want to support block devices for > somethign that is clearly intended for copying data files? Nitesh has a series to add block layer copy offload, and uses that to implement copy_file_range on block device nodes, which seems like a sensible use case for copy_file_range on block device nodes, and that series was hiding a change like this deep down in a "block" title patch, so I asked for it to be split out. It still really should be in that series, as there's very little point in changing this check without an actual implementation making use of it.