From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-f193.google.com ([209.85.219.193]:40204 "EHLO mail-yb1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726826AbeLBEMS (ORCPT ); Sat, 1 Dec 2018 23:12:18 -0500 MIME-Version: 1.0 References: <20181130200348.59524-1-olga.kornievskaia@gmail.com> <20181130200348.59524-2-olga.kornievskaia@gmail.com> In-Reply-To: From: Amir Goldstein Date: Sat, 1 Dec 2018 18:59:09 +0200 Message-ID: Subject: Re: [PATCH v2 01/10] VFS generic copy_file_range() support To: Olga Kornievskaia Cc: bfields@redhat.com, Dave Chinner , Jeff Layton , Matthew Wilcox , linux-fsdevel , Linux NFS Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, Dec 1, 2018 at 5:57 PM Olga Kornievskaia wrote: > > On Sat, Dec 1, 2018 at 9:03 AM Amir Goldstein wrote: > > > > > > > > On Sat, Dec 1, 2018, 3:44 PM Olga Kornievskaia >> > >> On Sat, Dec 1, 2018 at 8:23 AM Olga Kornievskaia > >> wrote: > >> > > >> > On Sat, Dec 1, 2018 at 3:11 AM Amir Goldstein wrote: > >> > > > >> > > On Fri, Nov 30, 2018 at 10:04 PM Olga Kornievskaia > >> > > wrote: > >> > > > > >> > > > Relax the condition that input files must be from the same > >> > > > file systems. > >> > > > > >> > > > Add checks that input parameters adhere semantics. > >> > > > > >> > > > If no copy_file_range() support is found, then do generic > >> > > > checks for the unsupported page cache ranges, LFS, limits, > >> > > > and clear setuid/setgid if not running as root before calling > >> > > > do_splice_direct(). Update atime,ctime,mtime afterwards. > >> > > > > >> > > > Signed-off-by: Olga Kornievskaia > >> > > > --- > >> > > > >> > > This patch is either going to bring you down or make you stronger ;-) > >> > > > >> > > This is not how its done. Behavior change and refactoring mixed into > >> > > one patch is wrong for several reasons. And when you relax same sb > >> > > check you need to restrict it inside filesystems, like your previous patch > >> > > did. > >> > > > >> > > You already had v7 patch reviewed-by 4 developers. > >> > > What made you go and change it (and posted as v2)? > >> > > > >> > > Your intentions were good trying to fix the broken syscall, but > >> > > I hope you understood that Dave didn't mean that you *have* to > >> > > add the missing generic checks as part of your work. He just > >> > > pointed out how broken the current interface is in the context of > >> > > reviewing your patch. > >> > > > >> > > In any case, I hear that Dave is neck deep in fixing copy_file_range() > >> > > so changes to this function should be collaborated with him. Or better > >> > > yet, wait until he posts his fixes and carry on from there. > >> > > > >> > > If I were you, I would just go back to the reviewed v7 vfs patch. > >> > > >> > This is NOT a replacement to the v7 vfs patch??? This is a new patch > >> > on top of that one. > >> > > >> > I assume that v7 patch has been OK-ed by everybody and is ready to go in??? > >> > > >> > As you recall, what was left is to provide the functionality to relax > >> > the check for the superblocks to be the same before calling the > >> > do_splice_direct(). This patch attempt do this. I was under the > >> > impression that to do so extra checks were needed to be added which I > >> > added. > >> > > >> > >> To clarify, previously I had a VFS patch with the client-side series > >> to support "server to server" copy offload. It needed the > >> functionality to be able to call copy_file_range with different super > >> blocks. > >> > >> This patch series is for the server side support for the "server to > >> server" copy offload. It requires ability to call copy_file_range() > >> and do a copy between NFS and a local file system. Thus it needs > >> generic_copy_file_range. > > > > > > Ah. Sorry for the confusion. > > My comment on change of behavior and refactoring in same patch still hold. > > My comment about coordinate your work with Dave Chinner still hold. > > Understood. I will email Dave directly and coordinate. > > > Raise that with a comment about adding test coverage to the new > > generic cross fs copy API to xfstest. > > What kind of extra coverage are you envisioning? Something that > requires two different file systems mounted and then does a fs copy? > Yes, if you add this functionality you should add test coverage for the added functionality. It's not going to be trivial to add cross fs type tests to xfstests, but adding cross fs (same type) should be relatively easy (copy_file_range from test fs to scratch fs). > > Am I mistaken that this change affects any cross fs copy file range > > by userspace and not only by kernel nfsd? > > That's correct, any cross fs copy is what I'm going for here. > Forgive me for being thick. After briefly going over the patches, I still don't understand if you *need* to add generic cross fs copy to implement server side copy support in nfsd? Or if you are adding it as an added bonus to the community along with your SSC patch set? The first two patches of the series seem unrelated to the rest, but maybe I'm just not getting the connection? Thanks, Amir.