Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1045261pxy; Thu, 22 Apr 2021 21:41:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8ThJK7k7FAQSIBjGivAGm4xXolbM0EBq9dpbcattCImgqUkD3jjr8xDExgi86ESzXSGGn X-Received: by 2002:a17:90b:1811:: with SMTP id lw17mr3503952pjb.163.1619152888829; Thu, 22 Apr 2021 21:41:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619152888; cv=none; d=google.com; s=arc-20160816; b=x6UX+KOew9CKrL6CbHUVhHppbEQDOAWZV1iFop3iDrGe6P9gYOVAK/FzSN/WI/7qLP ZIxoOchNIc0S/Aay33PidSQx+FikRMW1yXTvCp/sshCo5qewQ7X0G1XNc3glqs/su2z7 Mi64QvjoJT2sxEVplC/4MLjFh3MA6OSv25tXP7yV+35tEjzz7g23mUHgvp7gelgv2AZ4 UylhwrdnEieoyTGZt4BR9IGRLQEufC4lFZYMs35bUOYKz80p99f5LabO7BBF7Bv0BByn KHK0y/MpXQ4iWZSqcTWXeQuEt8IlkfcOils5t8Aeu/39HPf68vBQrNcByuO/6A1G2gSi jYlg== 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=cYjZlbF3DXM7zGnEvoUEauj9qs95JDVKd+qkmT8E5Es=; b=lgwnPCQ2rau1z/ajFlK5xd389v0T2gw4G2b5MrkB9/5wtDAtKMEqIkHfbmT45XEzuw wtKATlWUrPhwjhcoM60SjKYZZQ2n90Pjc35RvwPZOXnkB/86NpsnQngRh+Ul05IK2pXn dyE3nmf+JzNs+snKiMCsFkWasAgHUZ08IuczaavnTO3xUEoc+GACVHT5BqayjfnnnlAi vbaLAvR6lh6ceMwUUHQcYiVMidDJ7yJq8+G7vXnT1Deb4tagpGSkTm+40sD3YQno90cz tRh3dJBe3zxDz2pL7IebFPF1NTPspP6fgxC9APQh0WDLtSRsbNva9Vve2zy4PAchn8MX /ulA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Sz162M5O; 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 q17si5809056plk.424.2021.04.22.21.41.04; Thu, 22 Apr 2021 21:41:28 -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=Sz162M5O; 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 S232966AbhDWEle (ORCPT + 99 others); Fri, 23 Apr 2021 00:41:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229643AbhDWEld (ORCPT ); Fri, 23 Apr 2021 00:41:33 -0400 Received: from mail-ua1-x930.google.com (mail-ua1-x930.google.com [IPv6:2607:f8b0:4864:20::930]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 941CCC061756 for ; Thu, 22 Apr 2021 21:40:56 -0700 (PDT) Received: by mail-ua1-x930.google.com with SMTP id v23so14866006uaq.13 for ; Thu, 22 Apr 2021 21:40:56 -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; bh=cYjZlbF3DXM7zGnEvoUEauj9qs95JDVKd+qkmT8E5Es=; b=Sz162M5Od95RKrPl3X/Ac4xcDjeMsrrM/4Xt3pyER0eWJaPxr1EiE1YWPdfvaRqo8Z 9BuZXgXl61gDrjkAfvHLKWCwv0Hz3q0z5HGKJCQkDs0zZc1hd1SYYMVD4xhYjVO1eYBK nUrplSbXYGSOOCNOwNBzogI6pG1sjmuXCgXbc= 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=cYjZlbF3DXM7zGnEvoUEauj9qs95JDVKd+qkmT8E5Es=; b=tOweDErGGqApA12vRcN2XUoAj9TzVGk2LcCmmMHnOOX6pw2mqhQw1ZbO0DXQWrxqwm IEHm9yGL4qRBWG3v4eIK1rqY4cPXfBSCB9sqHWxhfZ668bXEY3+/uc55K9hJYwDKf6I/ Br4n0eNkJ8gDXsDAcWUKNqL8tNXPxXV20+EBGNi9CTXMTmjqBgLEndoI+MSEQirQ1S43 1roJt/ZP772dQ6+d5RipLrsOWnMF9adSndxEn/RCLzvK4xG7K3HCnSPuHrLoVt4X7JRv HQXnosmyPrl1BDm5zgehzumUfDtHmJmYrvOOHaUh6QgrSzEZ2mDpYsnP0ivUyHqFT52m l1QQ== X-Gm-Message-State: AOAM532q7UbsV1oqhpTJHjFsM4gO38lMzRgO/NlX+lnKPAgJQOelkv6y wwsPAkPBDbFrrnd7hT589cifGnAvlxf/hyqysbecQg== X-Received: by 2002:ab0:638e:: with SMTP id y14mr1572161uao.82.1619152855684; Thu, 22 Apr 2021 21:40:55 -0700 (PDT) MIME-Version: 1.0 References: <20210221195833.23828-1-lhenriques@suse.de> <20210222102456.6692-1-lhenriques@suse.de> <8735vzfugn.fsf@suse.de> In-Reply-To: From: Nicolas Boichat Date: Fri, 23 Apr 2021 12:40:44 +0800 Message-ID: Subject: Re: [PATCH v8] vfs: fix copy_file_range regression in cross-fs copies To: Amir Goldstein Cc: Luis Henriques , "Darrick J. Wong" , Olga Kornievskaia , Jeff Layton , Steve French , Miklos Szeredi , Trond Myklebust , Anna Schumaker , Alexander Viro , 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" Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Fri, Apr 9, 2021 at 9:50 PM Amir Goldstein wrote: > > On Fri, Apr 9, 2021 at 4:39 PM Luis Henriques wrote: > > > > Nicolas Boichat writes: > > > > > On Wed, Feb 24, 2021 at 6:44 PM Nicolas Boichat wrote: > > >> > > >> 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 wrote: > > >> > > > > > >> > > > A regression has been reported by Nicolas Boichat, found while using 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 content is > > >> > > > generated on-the-fly and thus reports a size of zero. > > >> > > > > > >> > > > This patch restores some cross-filesystem copy restrictions that existed > > >> > > > prior to commit 5dae222a5ff0 ("vfs: allow copy_file_range to copy across > > >> > > > devices"). Filesystems are still allowed to fall-back to the VFS > > >> > > > generic_copy_file_range() implementation, but that has now to be done > > >> > > > explicitly. > > >> > > > > > >> > > > nfsd is also modified to fall-back into generic_copy_file_range() in case > > >> > > > vfs_copy_file_range() fails with -EOPNOTSUPP or -EXDEV. > > >> > > > > > >> > > > Fixes: 5dae222a5ff0 ("vfs: allow copy_file_range to copy across devices") > > >> > > > Link: https://lore.kernel.org/linux-fsdevel/20210212044405.4120619-1-drinkcat@chromium.org/ > > >> > > > Link: https://lore.kernel.org/linux-fsdevel/CANMq1KDZuxir2LM5jOTm0xx+BnvW=ZmpsG47CyHFJwnw7zSX6Q@mail.gmail.com/ > > >> > > > Link: https://lore.kernel.org/linux-fsdevel/20210126135012.1.If45b7cdc3ff707bc1efa17f5366057d60603c45f@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? > > > > Hmm... good question. I'm not actually sure who would be picking it. Al, > > maybe...? > > > > Darrick, > > Would you mind taking this through your tree in case Al doesn't pick it up? Err, sorry for yet another ping... but it would be good to move forward with those patches ,-P Thanks! > Thanks, > Amir.