[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YVpT4siUyaWcbfQA@zeniv-ca.linux.org.uk>
Date: Mon, 4 Oct 2021 01:07:46 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: Ian Kent <raven@...maw.net>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Tejun Heo <tj@...nel.org>, Hou Tao <houtao1@...wei.com>,
David Howells <dhowells@...hat.com>,
Miklos Szeredi <miklos@...redi.hu>,
Rick Lindsley <ricklind@...ux.vnet.ibm.com>,
Carlos Maiolino <cmaiolino@...hat.com>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [REPOST,UPDATED PATCH] kernfs: don't create a negative dentry if
inactive node exists
On Mon, Oct 04, 2021 at 09:03:53AM +0800, Ian Kent wrote:
> It's been reported that doing stress test for module insertion and
> removal can result in an ENOENT from libkmod for a valid module.
>
> In kernfs_iop_lookup() a negative dentry is created if there's no kernfs
> node associated with the dentry or the node is inactive.
>
> But inactive kernfs nodes are meant to be invisible to the VFS and
> creating a negative dentry for these can have unexpected side effects
> when the node transitions to an active state.
>
> The point of creating negative dentries is to avoid the expensive
> alloc/free cycle that occurs if there are frequent lookups for kernfs
> attributes that don't exist. So kernfs nodes that are not yet active
> should not result in a negative dentry being created so when they
> transition to an active state VFS lookups can create an associated
> dentry is a natural way.
>
> It's also been reported that https://github.com/osandov/blktests.git
> test block/001 hangs during the test. It was suggested that recent
> changes to blktests might have caused it but applying this patch
> resolved the problem without change to blktests.
Looks sane, but which tree should it go through? I can pick it, but I've
no idea if anybody already has kernfs work in their trees...
Powered by blists - more mailing lists