Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5318574pxb; Mon, 15 Feb 2021 16:27:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwrY06k5QlRhsbteU8/TsYKOqz/JEz1CY7K9W4xWS3uQM+7o3v6Tsjo2WxIWhGDMTx95jml X-Received: by 2002:aa7:d7cb:: with SMTP id e11mr14611220eds.176.1613435257621; Mon, 15 Feb 2021 16:27:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613435257; cv=none; d=google.com; s=arc-20160816; b=eO1Had+JdNg97SyzxRvtI8kRkM72M6ftFn+pEf8f0XZOZLLm8xlVIzrxD0CM1x9BCz yabHcUt4isU4KhgrHNp8HXD9kPtZ32ENPRwzRS0gJheNd/oOaOklOv76I1jlULkhoPU3 T5DdwambupkJ9eQ6zCWjL23BsLi6BwMLoPmEoGrwH0jnvKhbH2EgWd5sbxD8awL1DWAs RZHlOno5Z8aXGPdSMReecQfj45wuwUbBt3L3ysc0IDUo7PYnoxPxresYf0p1Q60JzyMr lwbIEKsjmiFerGmz9LqL/c9Eg6kY7U5WeMr6/fz5QgGNQ8G98YFi59slNZe4Ai3X1LGm 6fRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ObQgczvE8R33D3cAuZo8fgSRVSdB2ZqxOCCYpoFtjv0=; b=oLUceKSRLEH2olm+gOT1awrwZkpqz8IbyQxAeX+Sz6ZikLmGPrH5ipPkfx5ljY1aqL 9W26w5q61eata39aHtWtmYDTyQo4qwow9z5btZ/+e0n4l6bDXIf1EHnRIE8vCL79O7jr LvEfilSOtAIg8xjMzYTmhAnqSTVZm7qSCBxHQKlROYVMIu1BdXTTtzeDKwgNxwdIXPOl uInwXxfDm9hjwG3G+MhB/DsRuxpRbcvO14mT17yp+5uWUsGp7s3azXEVgTXVNA629uVd 0+fnjUaN12op5/L1avxldwB0dE4iVrdnCvV/cd0C3oTrCrtxcQ7RC/Mg/1u/l7HyLA5V v+yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=e9zxxHz1; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i23si14375534ejj.317.2021.02.15.16.27.05; Mon, 15 Feb 2021 16:27:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=e9zxxHz1; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229694AbhBPA0F (ORCPT + 99 others); Mon, 15 Feb 2021 19:26:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbhBPA0E (ORCPT ); Mon, 15 Feb 2021 19:26:04 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ECA8C061574; Mon, 15 Feb 2021 16:25:24 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id v24so13233368lfr.7; Mon, 15 Feb 2021 16:25:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ObQgczvE8R33D3cAuZo8fgSRVSdB2ZqxOCCYpoFtjv0=; b=e9zxxHz1e7pAv3pU9NG4BuMQZ5DWngKrFtXaQo7gV8rSt4tJMPEF27HZv69/CW7ea/ /vLC32dq7fxlZhABT+nWhOp919k34UlfE/mlqwpbdgQnSZwkV+/r/Xt8x753rGZ1RTH2 S+yDoeWvtxFvYrSGlkVWcu/UdexliysthMcI+smWYVzurNi3WX4n90aQwATlf1qgokP3 GaWZhZXP2FKEadpKMKR4sc+rknFkIDqQvtyTkagsU4n80JxaK8yXJOr81z3gqEXr3DqW iJALt5NhZ4fV5VQ/Pza5AX3aD2AUHJPVMDgo98ihj2J2kkzXt3gU06EwEAt88jVP7NfI smsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ObQgczvE8R33D3cAuZo8fgSRVSdB2ZqxOCCYpoFtjv0=; b=AEA31faFoNdosJXGFDGsMz+VcLc796gFAC5Rd0eaUutz2ajiwYjcMXcZv/KNSSUB35 u/wIski13f4wp6g8+Wd7Cm1X4wlL9ZBf9ti+5aGgjglm39GCKNVLH3oSAyXTA3wWGXFk PLFw9oEoJeLOgvIYKpjYHGrOhXsguqWpB3dTNQlXpV/sgXRi18qeNgc74WceFg0bTQje v9zP1kajfVVwbYX22mts1pB5MmTPh72uEsFelH58+cLeOeWihYr4nFWDXtIvqJNzHyAq 3WKttrMU9RJgq0EPtwOWCjSHWqYWEGI0QpQgVLfSTwgzF8pk7q344MOFdoqQahfoEUZA tHiw== X-Gm-Message-State: AOAM532ubarOqYiJkXrVTw8StLb9k9e5OCxRF1OQDi+3RLd5C4/Zh2J0 eFfVObZiSCzJ7fnVsDTXea7+1yBxFXir0p5wcY8vwmY0HuM= X-Received: by 2002:a05:6512:2118:: with SMTP id q24mr4435716lfr.133.1613435122509; Mon, 15 Feb 2021 16:25:22 -0800 (PST) MIME-Version: 1.0 References: <20210215154317.8590-1-lhenriques@suse.de> In-Reply-To: From: Steve French Date: Mon, 15 Feb 2021 18:25:11 -0600 Message-ID: Subject: Re: [PATCH v2] vfs: prevent copy_file_range to copy across devices To: Trond Myklebust Cc: "drinkcat@chromium.org" , "anna.schumaker@netapp.com" , "iant@google.com" , "gregkh@linuxfoundation.org" , "dchinner@redhat.com" , "llozano@chromium.org" , "lhenriques@suse.de" , "sfrench@samba.org" , "darrick.wong@oracle.com" , "jlayton@kernel.org" , "amir73il@gmail.com" , "viro@zeniv.linux.org.uk" , "miklos@szeredi.hu" , "samba-technical@lists.samba.org" , "ceph-devel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-nfs@vger.kernel.org" , "linux-cifs@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Mon, Feb 15, 2021 at 10:11 AM Trond Myklebust wrote: > > On Mon, 2021-02-15 at 15:43 +0000, Luis Henriques wrote: > > Nicolas Boichat reported an issue when trying to use the > > copy_file_range > > syscall on a tracefs file. It failed silently because the file > > content is > > generated on-the-fly (reporting a size of zero) and copy_file_range > > needs > > to know in advance how much data is present. > > That explanation makes no sense whatsoever. copy_file_range is a non- > atomic operation and so the file can change while being copied. Any > determination of 'how much data is present' that is made in advance > would therefore be a flaw in the copy process being used (i.e. > do_splice_direct()). Does sendfile() also 'issue' in the same way? I agree that the explanation of the tracefs problem motivating this patch doesn't make sense. -- Thanks, Steve