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 DC46AC00528 for ; Mon, 24 Jul 2023 16:38:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231433AbjGXQio (ORCPT ); Mon, 24 Jul 2023 12:38:44 -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) 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.