Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1077402pxf; Thu, 8 Apr 2021 22:25:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvqXUi9VIwK1viAbLQv7jEdAJJtm5Ki7V1jLOhxrgXPNIBeJAu1U7dLY1XOkCpA/fWA66c X-Received: by 2002:a05:6402:350b:: with SMTP id b11mr15352261edd.288.1617945911201; Thu, 08 Apr 2021 22:25:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617945911; cv=none; d=google.com; s=arc-20160816; b=Kv1lVaQeQ9nxUzCtcpZ+LzA01ke9dRh4sgazAXbbGyQV3gIkH7IZZW2wdLR+TjCBEV Ep0bv8AMSOTsUagbqzDexvs7invDVpk0l4hkVF8TfQMAyqKlMxcySXkdL44X02TwT9LZ 1W1ZGeei00wPJW2KdeIcwLjX5EY7jVwTkydEfZBLTAFUOuUBh2YZYjgrdKzVtrK1I2hs nE59hJWLROqQDDSMer0yEqnCpuXT9iWuiU3GQGxHT4WD76/l+h9z7xlrcaCqpDtwB5d0 c6ndGO8ULXG6wmvylm7k0DY84B8M3Ui4f0sr4xhdSfEWi4TUWLmkAUJEtBhwjgLMrlts GCjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=gTs7X0Kha8yyPPjoketYAk4TM4kCJYNv+QtbVLV11qw=; b=OVZW/8cfWDDGtG/D0ke0KWuFwRnlBsY2V3nFua9TE3y3evnVzLGLP7FW3GebvJR0gy fENpEEgXKZdYTlemxjRYps5+uU2Ohh9gmchD065ZOXVUQDwS7A8NHS/TW7ODZ+/DmivL 6WdtIZ8BiXlws8yC4zheFw4enaAIkXK4l8jHgC7jQyKJiwdtPXpITCwhNfAPHxwqsEgK q9DYQSGTBvzIKhlFo4HWb54VxRq0stVoXQ6oMRM79/06qjv8dA7J9HVuayVzLE/CyFIQ QAAFpT0t+DPmdLhq51cfc7HF1fWmHLhqc7LN1z1O9lPq180tthnciZMyJveaBLNDNlVE nRdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JBxB536e; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt26si1283570ejb.142.2021.04.08.22.24.36; Thu, 08 Apr 2021 22:25:11 -0700 (PDT) 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=@chromium.org header.s=google header.b=JBxB536e; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233121AbhDIFYA (ORCPT + 99 others); Fri, 9 Apr 2021 01:24:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230219AbhDIFXt (ORCPT ); Fri, 9 Apr 2021 01:23:49 -0400 Received: from mail-ua1-x934.google.com (mail-ua1-x934.google.com [IPv6:2607:f8b0:4864:20::934]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEEBCC061762 for ; Thu, 8 Apr 2021 22:23:35 -0700 (PDT) Received: by mail-ua1-x934.google.com with SMTP id v23so1448433uaq.13 for ; Thu, 08 Apr 2021 22:23:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=gTs7X0Kha8yyPPjoketYAk4TM4kCJYNv+QtbVLV11qw=; b=JBxB536edN2icemaU8QdaNm6AYnLTCaemM3Ithzlz1Np8v6pO1wJVYu2ejP+rZfSsz 3qTVcd9dZRn1Feo6qXBUuDjeMAnnW2T0zl5u/1BBTcFJ+rKqnzY7gZyIabasGO0cSGPX 8205mExpo36r3SKCYZ/4AByGCO1VBW7dAvtH8= 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:content-transfer-encoding; bh=gTs7X0Kha8yyPPjoketYAk4TM4kCJYNv+QtbVLV11qw=; b=ggiHA7wkb9cVbH+916hPntIBYnlLo2ss0x4+PUwOY2e2c0WqOKRT0cEytKWv9kB2QK 4alz8ZrnimqQ4ecpJqOy7hvmUri83nyDfX+JcDVG7Iez3hzuLIPW/rDErFwMU53ROQIv J6KCBwyAlJ8o+X8sC7djU+QjI0H0ygBL1xQ6DWw7TXo6WLFkx9sPUPzfwElo9iwmpLVG 8ThBj+FTSOs0XvHYxI3AGPEJs00aCzhJ8NgX6w8PBRziMl/Y7TVKfu0BXiXuvMkXSnKG U3Q16Y8lrHlk9j955At1Yf4OrvK6z3ohlJwd1a5Hkwwv2YQVL9+PHy5lk1qufOCF24al 8O5A== X-Gm-Message-State: AOAM530gB3FltPcuK5NMXtBPCwmo7/uVNsKUxYZk/FOTK0tYR/T3Ejgy 7SVkn6eez8rl8bcJjDAhHTyCHtR7t9uNDaiy4UpTmQ== X-Received: by 2002:ab0:7593:: with SMTP id q19mr9451736uap.74.1617945814814; Thu, 08 Apr 2021 22:23:34 -0700 (PDT) MIME-Version: 1.0 References: <20210221195833.23828-1-lhenriques@suse.de> <20210222102456.6692-1-lhenriques@suse.de> In-Reply-To: From: Nicolas Boichat Date: Fri, 9 Apr 2021 13:23:23 +0800 Message-ID: Subject: Re: [PATCH v8] vfs: fix copy_file_range regression in cross-fs copies To: Luis Henriques Cc: Olga Kornievskaia , Amir Goldstein , Jeff Layton , Steve French , Miklos Szeredi , Trond Myklebust , Anna Schumaker , Alexander Viro , "Darrick J. Wong" , Dave Chinner , Greg KH , Ian Lance Taylor , Luis Lozano , Andreas Dilger , Christoph Hellwig , ceph-devel , linux-kernel , CIFS , samba-technical , linux-fsdevel , linux-nfs Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Wed, Feb 24, 2021 at 6:44 PM Nicolas Boichat wro= te: > > On Wed, Feb 24, 2021 at 6:22 PM Luis Henriques wrote= : > > > > On Tue, Feb 23, 2021 at 08:00:54PM -0500, Olga Kornievskaia wrote: > > > On Mon, Feb 22, 2021 at 5:25 AM Luis Henriques w= rote: > > > > > > > > A regression has been reported by Nicolas Boichat, found while usin= g the > > > > copy_file_range syscall to copy a tracefs file. Before commit > > > > 5dae222a5ff0 ("vfs: allow copy_file_range to copy across devices") = the > > > > kernel would return -EXDEV to userspace when trying to copy a file = across > > > > different filesystems. After this commit, the syscall doesn't fail= anymore > > > > and instead returns zero (zero bytes copied), as this file's conten= t is > > > > generated on-the-fly and thus reports a size of zero. > > > > > > > > This patch restores some cross-filesystem copy restrictions that ex= isted > > > > prior to commit 5dae222a5ff0 ("vfs: allow copy_file_range to copy a= cross > > > > devices"). Filesystems are still allowed to fall-back to the VFS > > > > generic_copy_file_range() implementation, but that has now to be do= ne > > > > explicitly. > > > > > > > > nfsd is also modified to fall-back into generic_copy_file_range() i= n case > > > > vfs_copy_file_range() fails with -EOPNOTSUPP or -EXDEV. > > > > > > > > Fixes: 5dae222a5ff0 ("vfs: allow copy_file_range to copy across dev= ices") > > > > Link: https://lore.kernel.org/linux-fsdevel/20210212044405.4120619-= 1-drinkcat@chromium.org/ > > > > Link: https://lore.kernel.org/linux-fsdevel/CANMq1KDZuxir2LM5jOTm0x= x+BnvW=3DZmpsG47CyHFJwnw7zSX6Q@mail.gmail.com/ > > > > Link: https://lore.kernel.org/linux-fsdevel/20210126135012.1.If45b7= cdc3ff707bc1efa17f5366057d60603c45f@changeid/ > > > > Reported-by: Nicolas Boichat > > > > Signed-off-by: Luis Henriques > > > > > > I tested v8 and I believe it works for NFS. > > > > Thanks a lot for the testing. And to everyone else for reviews, > > feedback,... and patience. > > Thanks so much to you!!! > > Works here, you can add my > Tested-by: Nicolas Boichat What happened to this patch? It does not seem to have been picked up yet? Any reason why? > > > > I'll now go look into the manpage and see what needs to be changed. > > > > Cheers, > > -- > > Lu=C3=ADs