Your CVS fix 1.109 to union_vnops.c

David Schultz das at FreeBSD.ORG
Sun Oct 3 13:07:52 PDT 2004


On Sun, Oct 03, 2004, Uwe Doering wrote:
> >>I think the three filesystem entry 
> >>1. upper layer file
> >>2. lower layer file
> >>3. unionfs file
> >>can be treated as different.
> >
> >I didn't pursue this before because I was concerned that it would
> >introduce cache consistency issues between the union vnode and the
> >underlying vnode.  But I guess all vnops ultimately wind up at the
> >underlying vnode, so this hopefully isn't an issue...
> 
> Applications use the synthesized unionfs vnodes. They have no knowledge 
> of what's going on underneath. So they can't tell whether one unionfs 
> vnode refers to a file in the upper layer, and the other to one in the 
> lower layer.

That isn't the issue.  The issue is that an application might open
the vnode in the unionfs mount, and another application might
modify the same file in the underlying file system.  If the kernel
doesn't understand that it is really the same file, then cache
incoherencies will occur.  I'm actually not sure to what extent
this is a problem already; John Heidemann's Phd thesis had a way
of dealing with it, but FreeBSD doesn't do things that way AFAIK.


More information about the freebsd-current mailing list