[Ocfs2-devel] [PATCH 6/7] vfs: Set special lockdep map for dirs only if not set by fs

Peter Zijlstra peterz at infradead.org
Tue Mar 3 07:44:45 PST 2009


On Mon, 2009-03-02 at 10:23 +0100, Jan Kara wrote:

>   Not that much - the difference is between "system directories" and normal
> directories. Currently we also have xattr i_mutex rank differently than
> normal i_mutex and this is exactly the same case. Only OCFS2 has much more
> such system files and also system directories so it's impractical to learn
> VFS about all of them...
>   But yes, probably I should update the changelog to say this so that
> a reader does not have to look up why we need it.

Just for my education, what is a system directory?

> > As to the patch, I'd rather you introduce a helper,
> > lockdep_match_class() or somesuch, if you can convince VFS folks that
> > what you're wanting to do is sane.
>   OK, sounds good. Does something like:
> #define lockdep_match_class(lock, key) lockdep_match_key(&(lock)->dep_map, key)
> 
> and
> 
> int lockdep_match_key(struct lockdep_map *lock, struct lock_class_key *key)
> {
> 	return lock->key == key;
> }
> 
>   Look fine to you? Thanks for opinion.

Yep, looks good, thanks!




More information about the Ocfs2-devel mailing list