Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp358725pxm; Wed, 2 Mar 2022 17:16:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJxuIPPygxP/ey/ylvtPaQqqEBQvvKDNwF6YirMbN7k9t/3KGVCV0pHHYZosagZZ7PGU9+YQ X-Received: by 2002:a05:6a00:2cd:b0:4e1:1989:5b7f with SMTP id b13-20020a056a0002cd00b004e119895b7fmr35510364pft.3.1646270199402; Wed, 02 Mar 2022 17:16:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646270199; cv=none; d=google.com; s=arc-20160816; b=QdX2HMNgQAMR8YWWGBBl8WSybeXx8xVCwR52kBx0PHdTfwHrXo88cnj4GS0oX7EK5r kP8jp3Hhf5fBUl70S5rtjYPzzbveF0bxc6tKxlxGVNZp5cYt2IezEmBNenM9TF6v/ceW +Vqnt4R6+pKJM9XX0oMDt48n/wxIGlk8tEp/STqADRk4b12DohTD5od8ZHkwtbBJpQVa UG/7mspjO1xODhhQVsFNAGKSriQs7regX8I8HHLf9jv9rm9Iu4VvRE6VCkd4nz00mlqW 8JlHkp7lDypvvmuMEXF0U4iI6xubHxPYTJ5P2iHvg1OpK68k8SCw9XCTdT7wDGMujaA8 Zv3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=PVPdsK6mDTStjJW2Q2VEm4DPwkA73bY/qghpukeoqYk=; b=nIlvYcUC8F0kShwbbZjCMT4/69/1c6+UtuCNBi7JTDL7yZ/+5BHjVPAvhC9GYwJNwp H6RJDi9y2akdryppHsG3UsiNR4QYVICPyXmDSSLWN461nFopadKLxln2hUiBv0pc+lWh pwaPLm+6w4WvLuxhlh3sY9J35bniPOA0ZK+OxhPUZj/aKMKRiaD4TB4F2rZ2z+2gtjl6 AGuXSM05RZ3I/KJGx8lp9tquwB8MLbEkBFjgoAwYJ7Hyc26fY/9/WoAUqNnD1nHLOv8R wShxiQiYaQJmsnhb8lHKL8HIUbCTA3Pig7cs7sa1xeTGwG2DrkeCr/I7/hCy8jJRwWzl RjVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=kRUVK90F; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t7-20020a056a0021c700b004e0f449dbc1si805185pfj.11.2022.03.02.17.16.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 17:16:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=kRUVK90F; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 233508EB69; Wed, 2 Mar 2022 16:50:04 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230466AbiCCAuq (ORCPT + 99 others); Wed, 2 Mar 2022 19:50:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230495AbiCCAuq (ORCPT ); Wed, 2 Mar 2022 19:50:46 -0500 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC42C85BD0; Wed, 2 Mar 2022 16:50:01 -0800 (PST) Received: by fieldses.org (Postfix, from userid 2815) id 266DA72C8; Wed, 2 Mar 2022 19:50:01 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 266DA72C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1646268601; bh=PVPdsK6mDTStjJW2Q2VEm4DPwkA73bY/qghpukeoqYk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kRUVK90Fr4BZ3TN4Zkf92wnI3pXU4iaw0N4fSi8b5d1oEzRIfhP7HiMSyHQ5yVT8a SmLdu2duEqyUCQTeR1rgkX/DGMh/UldSbabMR6PW0w0lWQcDsiCPK7TT/EAmTM/3Tg MVNlxGxKz/W+XHuuGFSXRb/BuV58fnQ5x/YzCREM= Date: Wed, 2 Mar 2022 19:50:01 -0500 From: "J. Bruce Fields" To: Josef Bacik Cc: linux-fsdevel , linux-nfs@vger.kernel.org, Chuck Lever Subject: Re: nfs generic/373 failure after "fs: allow cross-vfsmount reflink/dedupe" Message-ID: <20220303005001.GB21944@fieldses.org> References: <20220302082658.GF3927073@dread.disaster.area> <20220302211226.GG3927073@dread.disaster.area> <20220302220450.GD10757@fieldses.org> <20220302224250.GF10757@fieldses.org> <20220303000735.GA21944@fieldses.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Wed, Mar 02, 2022 at 07:29:34PM -0500, Josef Bacik wrote: > On Wed, Mar 02, 2022 at 07:07:35PM -0500, J. Bruce Fields wrote: > > Sorry, took me a minute to understand, myself: > > > > It's actually only the client behavior that changed. Previously the > > client would reject an attempt to clone across filesystems, so the > > server never saw such a request. After this patch, the client will go > > ahead and send the CLONE. (Which, come to think of it, is probably the > > right thing for the client to do.) > > > > So the server's probably always had a bug, and this just uncovered it. > > > > I'd be curious what the consequences are. And where the check should be > > (above or below vfs_clone_file_range()?). > > > > This is where I'm confused, this really shouldn't succeed > > loff_t do_clone_file_range(struct file *file_in, loff_t pos_in, > struct file *file_out, loff_t pos_out, > loff_t len, unsigned int remap_flags) > { > loff_t ret; > > WARN_ON_ONCE(remap_flags & REMAP_FILE_DEDUP); > > if (file_inode(file_in)->i_sb != file_inode(file_out)->i_sb) > return -EXDEV; > > > loff_t vfs_clone_file_range(struct file *file_in, loff_t pos_in, > struct file *file_out, loff_t pos_out, > loff_t len, unsigned int remap_flags) > { > loff_t ret; > > file_start_write(file_out); > ret = do_clone_file_range(file_in, pos_in, file_out, pos_out, len, > remap_flags); > > And even if we get past here, I imagine XFS would freak out because it can't > find the extents (unless you're getting lucky and everything is lining up?). > I'm super confused... Bah, I see what you mean. Maybe there's something wrong with my setup. I'll try some more stuff and report back.... --b.