[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090126140032.GE7532@hawkmoon.kerlabs.com>
Date: Mon, 26 Jan 2009 15:00:32 +0100
From: Louis Rilling <Louis.Rilling@...labs.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Joel Becker <Joel.Becker@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, cluster-devel@...hat.com,
swhiteho <swhiteho@...hat.com>
Subject: Re: [PATCH] configfs: Silence lockdep on mkdir(), rmdir() and
configfs_depend_item()
On 26/01/09 14:41 +0100, Peter Zijlstra wrote:
> On Mon, 2009-01-26 at 14:24 +0100, Louis Rilling wrote:
>
> > However configfs_rmdir() and configfs_mkdir() (recursively) lock inodes because
> > this is how the VFS works when removing/adding entries under a directory which
> > has already lived in the dcache.
>
> Ok, so then I'm not understanding things correctly.
You may understand the VFS better than I do actually.
>
> Its not a locking correctness thing, but simply not being able to do it
> from the vfs calls because those assume locks held?
>
> Can't you simply punt the work to a worklet once you've created/removed
> the non-default group, which can be done from within the vfs callback ?
I'm not sure to understand your suggestion. Is this:
1) for mkdir(), create the non-default group, but without its default groups,
and defer their creation to a worker which won't have constraints on locks held
by any caller;
2) for rmdir(), unlink the non-default group, but without unlinking its default
groups, and defer the recursive work to a lock-free context?
For mkdir(), this may work. Maybe a bit confusing for userspace, since mkdir(A)
returns as soon as A is created, but A may be populated later and userspace may
rely on A being populated as soon as it is created (current behavior). As a
configfs user, this makes my life harder...
For rmdir(), is this safe to unlink a non-empty directory, and to empty it
afterwards? This looks like going back to the unmount problem.
Thanks,
Louis
--
Dr Louis Rilling Kerlabs
Skype: louis.rilling Batiment Germanium
Phone: (+33|0) 6 80 89 08 23 80 avenue des Buttes de Coesmes
http://www.kerlabs.com/ 35700 Rennes
Download attachment "signature.asc" of type "application/pgp-signature" (190 bytes)
Powered by blists - more mailing lists