Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5039458pxb; Mon, 15 Feb 2021 08:01:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJxMRkCBmG2ieUwG+AHytE5fYUyfrKi9Y2k7A1UI5JuaQTlqrn46byi/ZiWVMq8ZlnKaK0oT X-Received: by 2002:a17:907:d25:: with SMTP id gn37mr16404878ejc.303.1613404897781; Mon, 15 Feb 2021 08:01:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613404897; cv=none; d=google.com; s=arc-20160816; b=uQOabOq6QnJoV7jL+JF57MQjzGvvpwXKj/h3Sx8RshFZTIPEc1LfqF2mD7SmVLKZnu 9klO+uAcTz2M5mQa50tIoSXGTXxWO6rOXDibun96IdXqb606+cOV2/t3+DodJjM55iaQ zn364tsi11nrUDRLz1/TScCzjp+beBT9LtQQ3bcgq9n0HDbczVIpolhrcXkMZnj71YuY Q6l0ovqFjGxyF4o61JLUxSM7sv/w5l/J6TluGrI5jLtXv8q3dBZIXzqveBWL+n3Z85N5 wzTEJonSwgpQAf98Tgiz0Aezrcqr5GtsVi5fpexzoVuakzN29k71L6BFwkr+i0c/vUge Azmw== 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 :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:organization:dkim-signature; bh=OnYhnv8s0U8pD0tC18wmERxMTL4ENMqkoYziI8GGiqM=; b=aX/rOhUStNXEM4xybU04S6KTcaBb9M3hT5qvyguVlbnYyq++X9guzFXPzg68o93of4 T9wH0pSTC+3prg9eXD57kULOwgG7wZSu/Lxiqga19N5wdXp6/ZyTyOpIZ20omry24Cwx 7byobPS7VYeqqoSUrnxgpySDlKjm3KpJ0XdjDIZkjdb+5OW85KOEMA84QZhjX7kIkP8Z kl8Bw6DGp8ALZyds1UyDk7x8tfyIaBESqiFruhWddNXYnkNYFe6U/ts7Y7XRQg1yeGqm 1EWS5MAjdI3SpLArG0EKtz0ahLvwleZj+Wo8/zMy9amYLqxSNwTeSklknJKInMgYBkt2 a4TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TOTxxIa5; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z14si2737395ejl.592.2021.02.15.08.00.51; Mon, 15 Feb 2021 08:01:37 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=TOTxxIa5; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231840AbhBOQAC (ORCPT + 99 others); Mon, 15 Feb 2021 11:00:02 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:40863 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232133AbhBOPwG (ORCPT ); Mon, 15 Feb 2021 10:52:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613404236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OnYhnv8s0U8pD0tC18wmERxMTL4ENMqkoYziI8GGiqM=; b=TOTxxIa5MJ99eEHK64SHik9LKYoGyUGcjc4M/VHdIIVqGuJdJk097BdfqnZiBTNZu6LMxT a8w9gOwqZRo3uZzZRnubpqlocsp20bP6PxDLmZzBMG+tG7Z+T0HaEF5INREsWonn8PZbwg WFoQt4dvgj0tftINmnRDzVPGB1moG/8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-247-mDlhAyPuNsyk1ZwX49DknQ-1; Mon, 15 Feb 2021 10:50:33 -0500 X-MC-Unique: mDlhAyPuNsyk1ZwX49DknQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5CEAA100A671; Mon, 15 Feb 2021 15:50:31 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-119-68.rdu2.redhat.com [10.10.119.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6F5E95B697; Mon, 15 Feb 2021 15:50:25 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH 30/33] ceph: fix fscache invalidation From: David Howells To: Trond Myklebust , Anna Schumaker , Steve French , Dominique Martinet Cc: Jeff Layton , ceph-devel@vger.kernel.org, linux-cachefs@redhat.com, linux-fsdevel@vger.kernel.org, dhowells@redhat.com, Jeff Layton , David Wysochanski , "Matthew Wilcox (Oracle)" , Alexander Viro , linux-cachefs@redhat.com, linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 15 Feb 2021 15:50:24 +0000 Message-ID: <161340422457.1303470.10027983783837430801.stgit@warthog.procyon.org.uk> In-Reply-To: <161340385320.1303470.2392622971006879777.stgit@warthog.procyon.org.uk> References: <161340385320.1303470.2392622971006879777.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.23 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Jeff Layton Ensure that we invalidate the fscache whenever we invalidate the pagecache. Signed-off-by: Jeff Layton Signed-off-by: David Howells cc: ceph-devel@vger.kernel.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org --- fs/ceph/caps.c | 1 + fs/ceph/inode.c | 1 + 2 files changed, 2 insertions(+) diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index ca07dfc60652..c40f713d6d21 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -1867,6 +1867,7 @@ static int try_nonblocking_invalidate(struct inode *inode) u32 invalidating_gen = ci->i_rdcache_gen; spin_unlock(&ci->i_ceph_lock); + ceph_fscache_invalidate(inode); invalidate_mapping_pages(&inode->i_data, 0, -1); spin_lock(&ci->i_ceph_lock); diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index adc8fc3c5d85..2caa6df0bcdf 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1906,6 +1906,7 @@ static void ceph_do_invalidate_pages(struct inode *inode) orig_gen = ci->i_rdcache_gen; spin_unlock(&ci->i_ceph_lock); + ceph_fscache_invalidate(inode); if (invalidate_inode_pages2(inode->i_mapping) < 0) { pr_err("invalidate_pages %p fails\n", inode); }