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 7CC83C001E0 for ; Mon, 24 Jul 2023 06:40:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230471AbjGXGkB (ORCPT ); Mon, 24 Jul 2023 02:40:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230443AbjGXGj7 (ORCPT ); Mon, 24 Jul 2023 02:39:59 -0400 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E3F810F8 for ; Sun, 23 Jul 2023 23:39:38 -0700 (PDT) Received: by mail-io1-xd29.google.com with SMTP id ca18e2360f4ac-7836272f36eso148440539f.1 for ; Sun, 23 Jul 2023 23:39:38 -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=NolonACAesmhtcqTxGI0qUZnzw1usnprxfymsDWosMB5Ea8aakdH7fVLOhxIBin0ta mjuduePObzahZ01m6Q7YH2rOV4bqS9ysyycly9RR7LHzdIzb/M/hnUn0V9IYr888YloX U+r/I4MZl0NjBKDR0DX4jwHpmeuQl1iz+trPuX1syfIJmrr1LEC0ttbxXqPy6xODL+AM 0FNpzAY8uEBz/y64ZcAHWpsaPTPqal2rWI4eVlXhK55KM3rc520DyqoeP+ayUExZN7VO rYev21FBV1JmYLe9Ydv0coYO6lGaI2g5FgVcpcDw6GCHtAdb0oIzCQatPIeWq7Yl7dR4 /syQ== X-Gm-Message-State: ABy/qLaFpc54uSp6C8AmhrZwJpZpCu5REEooSJqBjXAq2A+PF/15sURO NeHbnLa1MU1mxYYPMrcpweTDig== 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-fsdevel@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