Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp73154pxb; Wed, 14 Apr 2021 09:41:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrTD4j/eXZgpumWB5A1wNu6KuZhC0Tx5shv51/EFj7B/57NgYIcLHV0GbADxQVhyae9wHo X-Received: by 2002:a63:f056:: with SMTP id s22mr38520936pgj.369.1618418508237; Wed, 14 Apr 2021 09:41:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618418508; cv=none; d=google.com; s=arc-20160816; b=HI7d/mezZ32poBeWOnuBGuWmvHpH1RiAsPQP0u7TdtHYZU4muDW94jEvlMT2n8KxBy mo3Hv9lrfIUGCYDy9JvbasbWnttEiq1j3TmJ8NgEJjmMovR4fKdFenCI5IBVc9IutbaE 12I78AMBJhGcdkWMQNwl2CKmUJfxaAFetExweKsbkXs9Cd7zhtQjFuOuGPQJnfiG2AF1 zjWsbrFyeXsZxi4UWG5XNIoUa1maWTDoAAuqvmgAy9E4vCNzGYpHm78FXC85UWiSeBVy K9wlUMdXASxTdpS/OXQMjKzCNgRwJM8/jaFqOzq0kyfn8eLXBJrEDkFKOJ4DYUxmXJrL 434w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7nTjUUgUSZQzEbTqDXs+hgjSOqmgZqEp0vBk2We5eZc=; b=JRy/fd1lrfdeDgJbzpUR0jazYipHjxQELc9j3JTE/tcUQUDK204oG22HJdJTbTqx7n OVGYY4qTmcJUAnP7D2iXJLuRSBUqd9SWeW1I78cTGLmF+qaHWD7+5QZRN+3gCDoYsWMn EWGPUlFZ4C0K26tWK64sRICv8yayCdaLexUIwM/tRPyjORKFLSGJu9LW6AHm47F/t9tN 9Gxknrr6ibugj2HOauOoMTwjqk19zco3+ljqobMTevIBVioXbcb0poUj39ps1EW+89lH cTKup7yYbO+BvnDw9nVmq7NDQD9xgVwuKIylkITPIAzrOqFC3k5Nw/oDmRJIVTwM2eIT YGew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pi5GEJSg; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w186si40325pfw.241.2021.04.14.09.41.33; Wed, 14 Apr 2021 09:41:48 -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=@kernel.org header.s=k20201202 header.b=pi5GEJSg; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230488AbhDNOcC (ORCPT + 99 others); Wed, 14 Apr 2021 10:32:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:35508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231630AbhDNOcC (ORCPT ); Wed, 14 Apr 2021 10:32:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7F7BF61139; Wed, 14 Apr 2021 14:31:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618410700; bh=Hh3fbl/bAs++f8chcCzydInEgco/SmR/JtG6SNRbGr4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pi5GEJSgg/2z7cgFKrOBtuKYxPPR5iy1fRn/rEv7QUBnL+Ts7SlU9BwOTFvQTNq4y OJ+I+EEoGGKmB2ICT7l7VggvMXfWLKjBXvfP03qgTRItGzCpmyGen1FoO8oLG97A1a h36/ZmgpRbT85+gxe3TTFwO+Z3/mvnhuJuFn3CLe41ialOlIGwLgp3CHf8vowEeoq1 /gwhfImXOdaYClsgmcjI8ZlvBkQNUnfTXRmneFUP9Hsv3xx97wrNjBN/I+zE2Pw6rU PkExHbQhcDNM87VrIwuCmHjEYyxELKvNzgfqZAzVbNPMHjRYW+heMVSm8z67XexTS/ wdMtv9cymf3zw== From: trondmy@kernel.org To: "J. Bruce Fields" , Olga Kornievskaia Cc: linux-nfs@vger.kernel.org Subject: [PATCH 2/2] NFSv42: Don't force attribute revalidation of the copy offload source Date: Wed, 14 Apr 2021 10:31:38 -0400 Message-Id: <20210414143138.15192-2-trondmy@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210414143138.15192-1-trondmy@kernel.org> References: <20210414143138.15192-1-trondmy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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