From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:60046 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932190AbeCMAuN (ORCPT ); Mon, 12 Mar 2018 20:50:13 -0400 Date: Tue, 13 Mar 2018 00:50:11 +0000 From: Al Viro To: "Eric W. Biederman" Cc: John Ogness , Linus Torvalds , linux-fsdevel , Christoph Hellwig , Thomas Gleixner , Peter Zijlstra , Sebastian Andrzej Siewior , Linux Kernel Mailing List Subject: Re: dcache: remove trylock loops (was Re: [BUG] lock_parent() breakage when used from shrink_dentry_list()) Message-ID: <20180313005010.GV30522@ZenIV.linux.org.uk> References: <20180224002248.GH30522@ZenIV.linux.org.uk> <20180225073950.GI30522@ZenIV.linux.org.uk> <87bmgbnhar.fsf_-_@linutronix.de> <20180312191351.GN30522@ZenIV.linux.org.uk> <877eqhcab3.fsf@xmission.com> <20180312203916.GQ30522@ZenIV.linux.org.uk> <87woygan6p.fsf@xmission.com> <87tvtk97i8.fsf@xmission.com> <20180313003751.GT30522@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180313003751.GT30522@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Mar 13, 2018 at 12:37:51AM +0000, Al Viro wrote: > On Mon, Mar 12, 2018 at 06:52:31PM -0500, Eric W. Biederman wrote: > > > Ah. I see now there is now the s_roots list that handles > > that bit of strangeness. > > > > So one path is to simply remove the heuristic from > > path_connected. > > > > Another path is to have nfsv2 and nfsv3 not set s_root at all. > > Leaving the heuristic working for the rest of the filesystems, > > and generally simplifying the code. > > > > Something like the diff below I should think. > > > + /* Leave nfsv2 and nfsv3 s_root == NULL */ > > Now, grep fs/super.c for s_root. Or try to boot it, for that > matter... BTW, if rename happens on server and we step into directory we'd already seen in one subtree while doing a lookup in another, we will get it moved around. Without having the subtrees ever connected in dcache on client. So adding && IS_ROOT(sb->s_root) to the test also won't work.