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 81F38C001B0 for ; Mon, 24 Jul 2023 06:40:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230508AbjGXGkF (ORCPT ); Mon, 24 Jul 2023 02:40:05 -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-Google-Smtp-Source: APBJJlHV6rGQMRqhG8BlCwNt5/JB2Dpn4brGoL7I+r6vKYg4/PRYcUEmkkUFP/rWyfL3ZaD9uP5JmQ== 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> 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