Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3155804pxk; Tue, 15 Sep 2020 11:27:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdRhK3tF+S6qLnN0GRHrkZPwYHdwfylyUc9g/hhALj9hLFPu8PKZ0lCa31O2UGV5utX0L5 X-Received: by 2002:a50:b946:: with SMTP id m64mr24355509ede.92.1600194453969; Tue, 15 Sep 2020 11:27:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600194453; cv=none; d=google.com; s=arc-20160816; b=QrH2jzs6es2E6YOkBxSamQrjSrNDSSjQOIdj8uaYPTZ4xhjLzrnWZL+Wd6cJxBJorD 2FNLdWi8S9wBtbSJD35HM2j+WyfM7Xwq+o7S3j78DplWKNGlcGvGmKRMLKesTu3b2M9I 2hUTS3kuZertIm9sSUwYwIGx+jb8uG7VWACV55UycQed2vl08mWnukW78kb4ORIxpV08 iRJxE5uHd3/E82/mDJYEv0jq1XNaOXd7Oeg7gm569AlSPeV9v4qpvT1bhT/e/TT2lJnp qARfxW0iPryNKDa7ytkmWsoroggj+dGOUeGYvVWZjgw22LzIZXPeWDazXoH66WhWXZa9 hnZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:cc:to:from :date:subject:dkim-signature; bh=kJMkYQ5mUgUe6/LCH7hCqrkAXoDDE6Iuab8BgTClL6g=; b=iTgQo42X6+Kav5G0N7aZBnIeJAhF7ba5Ph6ArfAZ/BdIfRcUVaKt0D0LJbVzEekEop zenCFWDtUoTbdUkvMWpKQeYEnwHfdkEtWdW4tPp106rcugWvZT2gQxdKxvZV9ydLz/Tv 4BuXNyL/9GLXPkcV0Y5bh6ZqldqIjl3sc8EHYyTWxX/+mwFnDSDu6dNXqqR9X7Lq8gTu QSOze/xvtw+KtO+ZcgT5U6GuTF2al9WB0ZoVCv/mkU1U8EZauDqGbbyHtR1Se+Uzoz37 MbiSKne5lgKN2H5eI30wlL7uGQhnoWHSaEiz/OKL/C5bi8DmLI6+1MyKFg5Mp7jZnC7i MxFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=NzoCSDd0; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id wr19si9692207ejb.60.2020.09.15.11.27.05; Tue, 15 Sep 2020 11:27:33 -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=@amazon.com header.s=amazon201209 header.b=NzoCSDd0; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727926AbgIOS0P (ORCPT + 99 others); Tue, 15 Sep 2020 14:26:15 -0400 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:24074 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727559AbgIOS0L (ORCPT ); Tue, 15 Sep 2020 14:26:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1600194371; x=1631730371; h=date:from:to:cc:message-id:references:mime-version: in-reply-to:subject; bh=kJMkYQ5mUgUe6/LCH7hCqrkAXoDDE6Iuab8BgTClL6g=; b=NzoCSDd07Ywd8Nbor+MiFBTkZyu7JGqihbV8kg0IIoy03a43/nW9rhWu OLjhMh8e45hi8MtQCh6IJPGexASkNnrx+eVSg8o9R+/3MdBX06dhfPtFg EkyqsLnqE/LYzAJHYFcqTqF9UhNv1VT3qNR3loW+3nrFsZrG6hBu4zYyt o=; X-IronPort-AV: E=Sophos;i="5.76,430,1592870400"; d="scan'208";a="75174976" Subject: Re: [PATCH 1/1] NFSv4.2: fix client's attribute cache management for copy_file_range Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-1a-e34f1ddc.us-east-1.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP; 15 Sep 2020 18:19:45 +0000 Received: from EX13MTAUWA001.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan3.iad.amazon.com [10.40.163.38]) by email-inbound-relay-1a-e34f1ddc.us-east-1.amazon.com (Postfix) with ESMTPS id A1D6DA1FF7; Tue, 15 Sep 2020 18:19:42 +0000 (UTC) Received: from EX13D07UWA003.ant.amazon.com (10.43.160.35) by EX13MTAUWA001.ant.amazon.com (10.43.160.58) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 15 Sep 2020 18:19:41 +0000 Received: from EX13MTAUWA001.ant.amazon.com (10.43.160.58) by EX13D07UWA003.ant.amazon.com (10.43.160.35) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 15 Sep 2020 18:19:41 +0000 Received: from dev-dsk-fllinden-2c-c1893d73.us-west-2.amazon.com (172.23.141.97) by mail-relay.amazon.com (10.43.160.118) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 15 Sep 2020 18:19:41 +0000 Received: by dev-dsk-fllinden-2c-c1893d73.us-west-2.amazon.com (Postfix, from userid 6262777) id CB0E9C1400; Tue, 15 Sep 2020 18:19:41 +0000 (UTC) Date: Tue, 15 Sep 2020 18:19:41 +0000 From: Frank van der Linden To: Olga Kornievskaia CC: , , , Message-ID: <20200915181932.GA27779@dev-dsk-fllinden-2c-c1893d73.us-west-2.amazon.com> References: <20200914202334.7536-1-olga.kornievskaia@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200914202334.7536-1-olga.kornievskaia@gmail.com> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Mon, Sep 14, 2020 at 04:23:34PM -0400, Olga Kornievskaia wrote: > > > From: Olga Kornievskaia > > After client is done with the COPY operation, it needs to invalidate > its pagecache (as it did no reading or writing of the data locally) > and it needs to invalidate it's attributes just like it would have > for a read on the source file and write on the destination file. > > Once the linux server started giving out read delegations to > read+write opens, the destination file of the copy_file range > started having delegations and not doing syncup on close of the > file leading to xfstest failures for generic/430,431,432,433,565. > > Reported-by: Murphy Zhou > Fixes: 2e72448b07dc ("NFS: Add COPY nfs operation") > Signed-off-by: Olga Kornievskaia > --- > fs/nfs/nfs42proc.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c > index 142225f0af59..a9074f3366fa 100644 > --- a/fs/nfs/nfs42proc.c > +++ b/fs/nfs/nfs42proc.c > @@ -356,7 +356,11 @@ static ssize_t _nfs42_proc_copy(struct file *src, > > truncate_pagecache_range(dst_inode, pos_dst, > pos_dst + res->write_res.count); > - > + NFS_I(dst_inode)->cache_validity |= (NFS_INO_REVAL_PAGECACHE | > + NFS_INO_REVAL_FORCED | NFS_INO_INVALID_SIZE | > + NFS_INO_INVALID_ATTR | NFS_INO_INVALID_DATA); > + NFS_I(src_inode)->cache_validity |= (NFS_INO_REVAL_PAGECACHE | > + NFS_INO_REVAL_FORCED | NFS_INO_INVALID_ATIME); > status = res->write_res.count; > out: > if (args->sync) > -- > 2.18.1 Should this be copied to stable@ ? - Frank