NetBSD Problem Report #8183
Received: (qmail 10130 invoked from network); 10 Aug 1999 04:21:02 -0000
Message-Id: <19990802164303.E17F8102C@heap.epilogue.com>
Date: Mon, 2 Aug 1999 12:43:03 -0400 (EDT)
From: wes@epilogue.com
Reply-To: wes@epilogue.com
To: gnats-bugs@gnats.netbsd.org
Subject: unionfs: delay creation of shadow directories
X-Send-Pr-Version: 3.95
>Number: 8183
>Category: kern
>Synopsis: unionfs: delay creation of shadow directories
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Aug 09 21:35:01 +0000 1999
>Closed-Date:
>Last-Modified:
>Originator: Bill Sommerfeld
>Release: 19990802
>Organization:
>Environment:
System: NetBSD heap.epilogue.com 1.4 NetBSD 1.4 (HEAPII) #72: Sun Jul 4 00:38:40 EDT 1999 wes@:/usr/sommerfeld/NetBSD-sys/arch/i386/compile/HEAPII i386
>Description:
unionfs creates shadow directories in the upper
layer of the union whenever a lookup happens into a directory
which doesn't exist in the upper layer.
this occurs even if the union is mounted read-only; a find(1)
in a union mount with a mostly-empty upper layer still creates
lots of empty directories.
>How-To-Repeat:
mkdir /tmp/xxx
mount -o ro -t union /tmp/xxx /usr/src
find /usr/src -type d -print >/dev/null
umount /usr/src
ls -R /tmp/xxx
>Fix:
defer creation of shadow directories; just leave the upper
layer NULL in the union vnode until something gets put in
them.
when something gets created in a directory with a null upper
layer, scan upward in the union vnode directories until you
reach a union vnode which does have an upper-layer directory,
then use the framework for getcwd(2) between those two nodes
to figure out the correct pathnames of directories to create
in the upper layer.
this is likely to be vnode locking minefield.
getting it right in the presence of directory renames in the
lower layer is likely to be a PITA.
>Release-Note:
>Audit-Trail:
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.