Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp3364666rwo; Mon, 24 Jul 2023 09:55:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlERplqyC9H+YAGQOK03+cGVoxPkOBeNCVlb17Jk9F8CFksEC+uVRT1WlUariMcGRg0bQS+D X-Received: by 2002:a17:902:d34d:b0:1bb:a522:909a with SMTP id l13-20020a170902d34d00b001bba522909amr3532801plk.37.1690217725919; Mon, 24 Jul 2023 09:55:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690217725; cv=none; d=google.com; s=arc-20160816; b=qumAUsEbGijPJZDVQfYxLX3rjYPCsMjErdEJ4T1OEhRVNYVfCQLAoCcnji7SvsXI2B uOlvlwAXOSJ3s2uzZEq/bGYuYiQ8f41tl+LDaQsALjSWJ1QLH3ty4Bz0zRPRZAf3NJW6 M1ZYrIS+houwhWjgegAWkBsou2Rbm/f66ind/Xpg0q1reHOCzBJSn5O9GSjXOr8vqJXG RPQoU983YzltTeggRu2tR0auG1+TTXkFW5nmxOjIMtgifM/RuM/3OrsNF9voGapTVtDf lhVJ4Hjo0igGxc74tQ+cRdRFwAGFP2osAKt9/FIrhmZXzQ1sP8pu8krTQJke4w+lJgQS YtVw== 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=7oRcGho88zV+SHh8N2eUuQTe6SKW0tJlAqH4OKjo1h4=; fh=Nc0KXQPNMTyUjiRqcwxV8A+O6S8n7QVI64vH41dZDK0=; b=udNlT+ew/A5ASgvXrfjkcBWAWGmMkGTuFgDEc+zr6hGaS+v5j0QFGNhy1u1E7w3m5u ph8MKP2zltrlc3XNAznm0a6pqxXpWCpsIpBRKk8LN2pJN57PxqOocL/TZ2PUWWXxw5NC jAPTTIFFfq12jFzR8vv7iPPnCnMgAL+Jgb8/Pqa4dcMI/lr3h/88cMYziKeNiDqeCnUb MDGa61WFuWRMZaSMwAd0i4oCEsmWMuDN/XqkCC6c4HdlXCHXeLR2huPcZ50rXZqILVaD hyDdNDfdwTx2nyTz7STrmn3an4efCykJyY2rghccLWtvEDVFd+qF4kmdTwdE5UO94LIY 30LA== 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 y16-20020a17090264d000b001bb97f19c0fsi3659677pli.248.2023.07.24.09.55.12; Mon, 24 Jul 2023 09:55:25 -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 S231614AbjGXQkr (ORCPT + 99 others); Mon, 24 Jul 2023 12:40:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231575AbjGXQkj (ORCPT ); Mon, 24 Jul 2023 12:40:39 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3AF81981; Mon, 24 Jul 2023 09:40:20 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 3B5B967373; Mon, 24 Jul 2023 18:40:18 +0200 (CEST) Date: Mon, 24 Jul 2023 18:40:17 +0200 From: Christoph Hellwig To: Nitesh Shetty Cc: 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: <20230724164017.GC26430@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: <20230724060336.8939-1-nj.shetty@samsung.com> 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 > { > - struct inode *inode_in = file_inode(file_in); > - struct inode *inode_out = file_inode(file_out); > + struct inode *inode_in = file_in->f_mapping->host; > + struct inode *inode_out = file_out->f_mapping->host; This doesn't directly have anything to do with block devices, as regular files can also have a f_mapping that's different. None of the file systems actually supporting copy offload right now do, but changing the dereference here is a correctness thing totally independent of block device support.