Re: [PATCH 21/32] union-mount: Make lookup work for union-mounted file systems

From: Miklos Szeredi
Date: Wed May 20 2009 - 06:21:34 EST


On Tue, 19 May 2009, Valerie Aurora wrote:
> On Tue, May 19, 2009 at 06:15:52PM +0200, Miklos Szeredi wrote:

> > Worse, it looks like there are still i_mutex lock ordering issues
> > (__hash_lookup_topmost()/__hash_lookup_build_union()). What happens
> > if two separate unions of two filesystems are built where the order of
> > branches is reversed?
>
> We have a similar problem in union_copyup_dir(). Hm, thinking about
> this, only one of the file systems can actually change while we are
> doing work. That might help us get out of the lock ordering problems.
> Thoughts?

Right, we talked about this with Jan, and came basically to the same
conclusion. The lookup on the lower branches needs to be separate
from the atomic lookup/create on the top branch. Which means some
restructuring in the callers...

I'm not sure how all this could be simplified, I don't yet even
understand what all these different lookup functions are meant to do
(header comments might help).

Thanks,
Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/