Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp630277yba; Thu, 18 Apr 2019 07:07:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxkZEUF2sJk3/mC+9cO0G3+AvzTqdU42A/YNtP2cxAhY9WPQddt6AXNmIdAdUuhWvxWHut X-Received: by 2002:a62:1701:: with SMTP id 1mr97158981pfx.120.1555596454642; Thu, 18 Apr 2019 07:07:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555596454; cv=none; d=google.com; s=arc-20160816; b=BWNgtBAoqP7w9tnORqe0Mu88rUjm8A/vkAA1a8f7BOAU0b4aLjr+EGu/FYg90FdfUs lqxiPS5OS2s2n+kAMzNLPQYzhvZQpYjqYCm83e1d/zKaQOBozQFvy9WElJFDa4bmZ0k+ NHUmLAmDPLJ+5fK0UeXN2Oejjp+iHD/z2EjAcIowKHjIod73NTee4W8CksIuWkblpBv2 ktA0kjYRiXYnwumwqd64m/MY88O03Z+P2hDjQmH7/l9bAq5FRkjircky61TxKe37azEs aDacl0JvJ/qvEolweTCmEnE24/yOmYyMKGqZSxcimbCv40JIUI0z7fouYe0c+Rjh65a6 Zlzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:date:cc:to:from:subject; bh=vl0H+09t8VxOgMDCj7tsHhFOxKwAYfXhOsnjro3tFaI=; b=uqyFLsVxDIzHNTmBqbLLaIOqDVNSJwqFhhp60/yYHBiTQq+1q2Ia3Y6zGwQS0i11cm vpsZOjavOnGJz7bBRLR6bfOA6NHxlkKNJfojG2BIme6B99GuQhVcjkynu6ONuCLqjbjd xdxwzvLomvZ58ce8TbtVU2XSZer/tCsXjbpB5OCuPIozHasKcQcTYwFREy+vnHUr89cX 6pTMrh3TW3ywKIwy8mykTvzQgsSU3UXp+avRyFOs9fw4rdE/tqalEXFx/cw0eIM/gfFJ D/MDqNi94ucQwIVujMJodCUDC5yVyIGYY4l/6pRR8yl1RVs+gQcSUXcAxTqYE3b6B+XB //tw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k12si2026472plt.28.2019.04.18.07.07.19; Thu, 18 Apr 2019 07:07:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389210AbfDROGD (ORCPT + 99 others); Thu, 18 Apr 2019 10:06:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50142 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388392AbfDROGC (ORCPT ); Thu, 18 Apr 2019 10:06:02 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CBFEF307CB3F; Thu, 18 Apr 2019 14:06:01 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-121-98.rdu2.redhat.com [10.10.121.98]) by smtp.corp.redhat.com (Postfix) with ESMTP id 606D260857; Thu, 18 Apr 2019 14:05:57 +0000 (UTC) Subject: [RFC PATCH 0/6] vfs: Make icache searchable under RCU From: David Howells To: viro@zeniv.linux.org.uk Cc: Jan Harkes , Theodore Ts'o , Andreas Dilger , codalist@coda.cs.cmu.edu, coda@cs.cmu.edu, linux-ext4@vger.kernel.org, linux-afs@lists.infradead.org, dhowells@redhat.com, linux-afs@lists.infradead.org, linux-ext4@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 18 Apr 2019 15:05:51 +0100 Message-ID: <155559635133.21702.4737487773869377967.stgit@warthog.procyon.org.uk> User-Agent: StGit/unknown-version 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Thu, 18 Apr 2019 14:06:02 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Al Here are some patches that make the icache searchable under RCU. This benefits ext4 (which can use it to find an inode to update the timestamps on) and afs (which can use it to find a vnode to invalidate the callback promise on). It might also benefit NTFS, if its use ilookup5_nowait() can be substituted for. I'm not sure whether it actually needs to wait for inodes that are undergoing deletion. The first patch in the series attempts to fix the non-use of locking in Coda when it moves an inode between buckets because it needs to update the search key. Thanks, David --- David Howells (6): vfs, coda: Fix the lack of locking in FID replacement inode rehashing vfs: Change inode_hash_lock to a seqlock vfs: Allow searching of the icache under RCU conditions afs: Use RCU inode cache search for callback resolution ext4: Search for an inode to update under the RCU lock if we can vfs: Delete find_inode_nowait() fs/afs/callback.c | 12 ++ fs/coda/cnode.c | 11 ++ fs/ext4/inode.c | 41 ++++--- fs/inode.c | 309 ++++++++++++++++++++++++++++++++++++---------------- include/linux/fs.h | 11 +- 5 files changed, 260 insertions(+), 124 deletions(-)