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 X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80568C433E6 for ; Thu, 18 Feb 2021 12:56:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3331A64E3E for ; Thu, 18 Feb 2021 12:56:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232966AbhBRMz4 (ORCPT ); Thu, 18 Feb 2021 07:55:56 -0500 Received: from mx2.suse.de ([195.135.220.15]:59146 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232406AbhBRKb0 (ORCPT ); Thu, 18 Feb 2021 05:31:26 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 693E2AD2B; Thu, 18 Feb 2021 10:28:06 +0000 (UTC) Received: from localhost (brahms [local]) by brahms (OpenSMTPD) with ESMTPA id c89a0fc7; Thu, 18 Feb 2021 10:29:09 +0000 (UTC) From: Luis Henriques To: Amir Goldstein Cc: Christoph Hellwig , Jeff Layton , Steve French , Miklos Szeredi , Trond Myklebust , Anna Schumaker , Alexander Viro , "Darrick J. Wong" , Dave Chinner , Greg KH , Nicolas Boichat , Ian Lance Taylor , Luis Lozano , ceph-devel , linux-kernel , CIFS , samba-technical , linux-fsdevel , Linux NFS Mailing List Subject: Re: [PATCH v2] vfs: prevent copy_file_range to copy across devices References: <20210215154317.8590-1-lhenriques@suse.de> <20210218074207.GA329605@infradead.org> Date: Thu, 18 Feb 2021 10:29:08 +0000 In-Reply-To: (Amir Goldstein's message of "Thu, 18 Feb 2021 11:10:00 +0200") Message-ID: <87v9apis97.fsf@suse.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Amir Goldstein writes: > On Thu, Feb 18, 2021 at 9:42 AM Christoph Hellwig wrote: >> >> Looks good: >> >> Reviewed-by: Christoph Hellwig >> >> This whole idea of cross-device copie has always been a horrible idea, >> and I've been arguing against it since the patches were posted. > > Ok. I'm good with this v2 as well, but need to add the fallback to > do_splice_direct() > in nfsd_copy_file_range(), because this patch breaks it. > > And the commit message of v3 is better in describing the reported issue. Except that, as I said in a previous email, v2 doesn't really fix the issue: all the checks need to be done earlier in generic_copy_file_checks(). I'll work on getting v4, based on v2 and but moving the checks and implementing your review suggestions to v3 (plus this nfs change). Cheers, -- Luis