Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp2743088rwo; Sun, 23 Jul 2023 23:57:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlFcQqv9p6hEQ8WR5nLJiC39ztAOwNRaNru8f8k/sM3tt32k55bvcqy/yhRhRDMJL9sj4rxK X-Received: by 2002:a05:6a20:8f2a:b0:133:fd64:8d48 with SMTP id b42-20020a056a208f2a00b00133fd648d48mr7481195pzk.4.1690181820696; Sun, 23 Jul 2023 23:57:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690181820; cv=none; d=google.com; s=arc-20160816; b=IfFHMU+P+lnkTwe1LTdtmptTPj3iryj/YAh3UsNr6SlsWJoLyrGjHQdK41wGjv7UPn e1EEh/tLgaoYhjht489u/+8y3M19YJO3IABvia9BeWhpY1qXGLFNcWBdXj34Gj3C2YiW yQrPKTf36Zx27ALrbY146x8ICZ5VAyM/bDxHfA3+D0Zk3KAelow0IWU1QAjeKUnMmmuP 4aZxC0lbDGj1LyBAEgAkgPqgIVJrWCz4Cic3K8u+QS5hcncq+VDD077Ssb5+GFUfLRNp K2aX2P0VLBk2s1nS6aS613To6xKpXJBVAD/U7Ivt//XZKAk+Zh9/GRV0DvUvy+AJtWRo 46HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UA46JXOgesbC+Hw0WTVb9Ex0u0JFh+2lvb8Dt3Xe0GY=; fh=3VVO+85o2B3cy6Kyupu1qvgoO3a44sDNbtyqA0MUNcs=; b=IFvLXijvvFxRUmXJ+KmCZvkc8fnCRgvKKEgrNOUwlB5V+gi7hvJFzSBX5mD1BzTeXU 2UbdXNOi57P5Fplr5ExJl0k060NFcdpoC0fOwJzdhiZHhpuwhAtteCZswU6vVqDiAZkp TH2mamraXgRQ2FmxC7c1J1+YKJAkQqLiJqek+LgDda5WuWCyM4uwhwh4THiBNXs+KeLd zBNfll2JiDmz5a3VRmm0qoNBgg3pDNCIv9KyIIVqvyRA16/Kv6rftczGCdh7SqZoLfrS Iz0HMDcrHR0hZ44SWNnHEatTvSls0ZwxBgL1DdJErNNDDPJn412mqz6koDlWr07Ncocn wO4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fromorbit-com.20221208.gappssmtp.com header.s=20221208 header.b=JSlKugo9; 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fromorbit.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jy5-20020a17090342c500b001b9e36ed387si7817927plb.525.2023.07.23.23.56.48; Sun, 23 Jul 2023 23:57:00 -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; dkim=pass header.i=@fromorbit-com.20221208.gappssmtp.com header.s=20221208 header.b=JSlKugo9; 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fromorbit.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230484AbjGXGkC (ORCPT + 99 others); Mon, 24 Jul 2023 02:40:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230481AbjGXGj6 (ORCPT ); Mon, 24 Jul 2023 02:39:58 -0400 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA80510F7 for ; Sun, 23 Jul 2023 23:39:37 -0700 (PDT) Received: by mail-io1-xd2e.google.com with SMTP id ca18e2360f4ac-7835ae70e46so147541039f.3 for ; Sun, 23 Jul 2023 23:39:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fromorbit-com.20221208.gappssmtp.com; s=20221208; t=1690180775; x=1690785575; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=UA46JXOgesbC+Hw0WTVb9Ex0u0JFh+2lvb8Dt3Xe0GY=; b=JSlKugo93w0LuvvZESIAqXK6JMorSBm2Ud2Jp8AIpXbKxCfQMgtUComirCGVW/KZVh /RYjmhzK3M6Njr/rTrAH3a+R0mzs+vvSMxv6d+tTAf4K4fODG2Ry8ylSUQdVJwP+9xc4 35kJ25AUs9tLxhEotHLmGZ9D7jjHqnrx9YIrLRvnVGBfvZmcTK7XN8srAYYy2CnOX5iG sEzePFGOAnaBsMHAJRay3/QSKhdMWUrZDj5xnqUaFK5Ja2x6tHjjNENu2DRgbNUJIhBn nNe0MEY9DksIp5wBk7YxeZo8BO8VEY1y4WvdlbBVSgQopiKuA2Ex5tE9HXmjBwD1lN7/ f9kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690180775; x=1690785575; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=UA46JXOgesbC+Hw0WTVb9Ex0u0JFh+2lvb8Dt3Xe0GY=; b=BktdfJVzh+oJd9vKC5iDnIKc7rd9K4Gt7ywxnAWBHpc7xn52O0XqYxLA7p5L5bGxG1 /eTgv5jQ/wMxq0xXiXRT7EUFkcllGkkQge9FCxJy9B0KTF15I8Uy/cCzThq9TWYHt1kv 45/wU2PLDC34lys3xfIz5eISv8QCbqTmkzgQreVzlcjyX213+YR1ABpq5a0fdyufh67j 1+7EAkO6gKvOrE2h2pzzk3rL0DFQMpsaZ6/1C6A/XnJYa8aDAkDE95jPR2ZC4r+pIlvi EVqsF2XHcc+UFF3tuMPpEnTjV/XGW1Lgp3SIE3C0uoQb26dAKB+StzC2C2s2cIv1k3f3 7elA== X-Gm-Message-State: ABy/qLaF7GW80+L/DoNYLm0OWKdYlT4X5oMmxWKc/jj6nLQX6BGlV3Jh HLCDMNCBafOl2xgvlWfVoAjjpw== X-Received: by 2002:a5d:9f18:0:b0:783:58f4:2e2e with SMTP id q24-20020a5d9f18000000b0078358f42e2emr6459037iot.0.1690180775592; Sun, 23 Jul 2023 23:39:35 -0700 (PDT) Received: from dread.disaster.area (pa49-186-119-116.pa.vic.optusnet.com.au. [49.186.119.116]) by smtp.gmail.com with ESMTPSA id x9-20020a056a00270900b00654228f9e93sm6933872pfv.120.2023.07.23.23.39.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jul 2023 23:39:35 -0700 (PDT) Received: from dave by dread.disaster.area with local (Exim 4.96) (envelope-from ) id 1qNpEC-009qt9-1h; Mon, 24 Jul 2023 16:39:32 +1000 Date: Mon, 24 Jul 2023 16:39:32 +1000 From: Dave Chinner 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: 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> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, 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 On Mon, Jul 24, 2023 at 11:33:36AM +0530, Nitesh Shetty wrote: > From: Anuj Gupta > > 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? Also, the copy_file_range man page states: ERRORS ..... EINVAL Either fd_in or fd_out is not a regular file. ..... If we are changing the behavioru of copy_file_range (why?), then man page updates need to be done as well, documenting the change, which kernel versions only support regular files, etc. Cheers, Dave. -- Dave Chinner david@fromorbit.com