NetBSD/sys/miscfs/union
sommerfeld d96e35f23c Fix PR4439: directory link count in unions where only upper directory
exists is bogus.  The goal here is to produce a synthetic link count
which won't confuse fts and similar routines which "know" that
directories with a link count of 2 don't have subdirectories (and
thus, they can avoid having to stat every entry in the directory
looking for subdirectories which aren't there).

We know that non-UNIX filesystem implementations may return a link
count of `1' for directories with an indeterminate number of
subdirectories; if either the upper or lower layer returns a link
count of `1', return a link count of 1.  If both layers return a link
count of 2, return a link count of 2; otherwise, return the sum of the
link count of both layers.

Also, fix PR7430: unionfs ignores read-only mounts.  Check for
MNT_RDONLY in union_lookup (more-or-less as in layer_lookup) as well
as union_access() and union_setattr().

Note that a read-only union layer may still cause side effects on the
underlying filesystems...  Most notably, we'll still attempt to create
shadow directories in the upper layer.  Also, of course, we'll
side-effect atimes in the lower layer.
1999-08-01 23:16:34 +00:00
..
Makefile Rework the way kernel include files are installed. In the new method, 1998-06-12 23:22:30 +00:00
union.h Fix PR5146: reboot with working directory in unionfs causes 1999-08-01 00:00:57 +00:00
union_subr.c Fix PR4439: directory link count in unions where only upper directory 1999-08-01 23:16:34 +00:00
union_vfsops.c On forced unmount, do a few passes of non-forced cleanups and then do 1999-07-31 23:56:15 +00:00
union_vnops.c Fix PR4439: directory link count in unions where only upper directory 1999-08-01 23:16:34 +00:00