Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp136426pxb; Wed, 14 Apr 2021 11:13:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYo7ycYRbh35nUO+kIjM6+VuM60U880BhBCOniVZ6d6D6nC1RFGoChPtPATPjY1SVYHLok X-Received: by 2002:aa7:984d:0:b029:24c:8251:6d93 with SMTP id n13-20020aa7984d0000b029024c82516d93mr16566887pfq.34.1618424023135; Wed, 14 Apr 2021 11:13:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618424023; cv=none; d=google.com; s=arc-20160816; b=nysT0xM2R7RtE4NNGK2jIpmMQHIgIwpClf/ZMU3B9qPPD4TWkQ7KXTcMl/SCbb+3cH sICTWbo9mfEt6MXE1mSskyVLO4O97xSUXIq2hvIs7eWBcj2ZNAnZ/KrL7bmEQmJUWH2K qtCbkDAdSV5GCJuq1aZJwm3XFHOkCP0yJcYBc38DFez90a3OjoP//CJ01tWL0VvQ6Jj3 t0G8EE+chAqozVDgVega8GY7+H/W5mL2VufUdWz5nG7ttQjmi3/tsRyNXbx3VGbDtrH4 2Gq3Nea+WyWModlrB4qU4i8hfjt1rkiZg8nc2L1iFlsGJFrR59ziyrR9BcXrcu1g2KL2 Ca8g== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-filter; bh=LjGVxJ+ciEy7fc7/CLKLe8ZGwCj0RQ3YRSTgYcIBUn4=; b=sDM8BCEcoZTJIDWQ6U1ERjfCvhhokk9fbn9Ojp2RSEgUGnlBq5lksVO+jSidYkx8/p gGOI9WcXQYjoBcvVFV700GNF8HOXI0btGKvLfJWifbreCktq7BC4HALNYKX29wklKI1A ke0ZcfQUXjbNowUxAHqvyNmmdeIi8i7EIZ4nGn0YzAlEQ4pep0sdwcWuC4Adeqh6GvC9 RtR3DFTJ6dRKKj9ler8AsOVnNlRL0mMt+GoBTSNhH0qASIGE/XjJOO9/dySzv8Kec/eU gBBcw0ozVbXkk53mUYKq28xGcUT3nkRjAkjWPOxvjcPdBNtCnwEiaTX/iTjFhwZaV3AS +K9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=dmbPRDpl; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s15si383249plg.84.2021.04.14.11.13.29; Wed, 14 Apr 2021 11:13:43 -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=@fieldses.org header.s=default header.b=dmbPRDpl; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233556AbhDNR2s (ORCPT + 99 others); Wed, 14 Apr 2021 13:28:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232040AbhDNR2s (ORCPT ); Wed, 14 Apr 2021 13:28:48 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 414AFC061574 for ; Wed, 14 Apr 2021 10:28:27 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id 94BC0724A; Wed, 14 Apr 2021 13:28:25 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 94BC0724A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1618421305; bh=LjGVxJ+ciEy7fc7/CLKLe8ZGwCj0RQ3YRSTgYcIBUn4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dmbPRDplTGuAAZx8rt5acrUeYJJEzcN+GtO+sY+AhSnCexKtVERcQL6CvHuTiBhWm ZaWyn2FrKSb3bohhEJ1P6CQh4FLN2GFWK2esfBW3ljhgjvkdjlEQPCEP0+TR/zEN+a I0VO4imKjuMYdQ4v0bAVApsWsNWA3JxzGRq6hdB0= Date: Wed, 14 Apr 2021 13:28:25 -0400 From: "bfields@fieldses.org" To: Trond Myklebust Cc: "trondmy@kernel.org" , "linux-nfs@vger.kernel.org" , "kolga@netapp.com" , "bfields@redhat.com" Subject: Re: [PATCH 2/2] NFSv42: Don't force attribute revalidation of the copy offload source Message-ID: <20210414172825.GE16800@fieldses.org> References: <20210414143138.15192-1-trondmy@kernel.org> <20210414143138.15192-2-trondmy@kernel.org> <20210414144033.GC16800@fieldses.org> <20210414170519.GD16800@fieldses.org> <608b1babd125f72517a5116c4ed1e39e8104ae52.camel@hammerspace.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <608b1babd125f72517a5116c4ed1e39e8104ae52.camel@hammerspace.com> User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Wed, Apr 14, 2021 at 05:23:53PM +0000, Trond Myklebust wrote: > On Wed, 2021-04-14 at 13:05 -0400, J. Bruce Fields wrote: > > On Wed, Apr 14, 2021 at 10:40:33AM -0400, bfields wrote: > > > Thanks!  Testing.... > > > > ... and, test results back with these two patches applied, looks > > good! > > So, just out of curiosity. With which backing filesystem were you > testing? If it was XFS, then note that you may have been testing the > CLONE functionality instead of copy offload. As you saw, I added the > same fix for both clone and copy offload because they have the same > requirements for how the page and attribute caches are handled, so the > end result should be the same. However the unpatched code is very > different for the two methods, and clone may have been missing more > functionality than the actual copy-offload was. I think it was actually xfs, but I did look at a trace and my memory is it was trying a CLONE and falling back on COPY. I'll double check.... --b. > > > > > --b. > > > > > > > > --b. > > > > > > On Wed, Apr 14, 2021 at 10:31:38AM -0400, trondmy@kernel.org wrote: > > > > From: Trond Myklebust > > > > > > > > When a copy offload is performed, we do not expect the source > > > > file to > > > > change other than perhaps to see the atime be updated. > > > > > > > > Signed-off-by: Trond Myklebust > > > > --- > > > >  fs/nfs/nfs42proc.c | 7 +------ > > > >  1 file changed, 1 insertion(+), 6 deletions(-) > > > > > > > > diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c > > > > index 3875120ef3ef..a24349512ffe 100644 > > > > --- a/fs/nfs/nfs42proc.c > > > > +++ b/fs/nfs/nfs42proc.c > > > > @@ -390,12 +390,7 @@ static ssize_t _nfs42_proc_copy(struct file > > > > *src, > > > >         } > > > >   > > > >         nfs42_copy_dest_done(dst_inode, pos_dst, res- > > > > >write_res.count); > > > > - > > > > -       spin_lock(&src_inode->i_lock); > > > > -       nfs_set_cache_invalid(src_inode, NFS_INO_REVAL_PAGECACHE > > > > | > > > > -                                                > > > > NFS_INO_REVAL_FORCED | > > > > -                                                > > > > NFS_INO_INVALID_ATIME); > > > > -       spin_unlock(&src_inode->i_lock); > > > > +       nfs_invalidate_atime(src_inode); > > > >         status = res->write_res.count; > > > >  out: > > > >         if (args->sync) > > > > -- > > > > 2.30.2 > > -- > Trond Myklebust > Linux NFS client maintainer, Hammerspace > trond.myklebust@hammerspace.com > >