NetBSD Problem Report #44383
From www@NetBSD.org Thu Jan 13 10:53:33 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 8451C63B89F
for <gnats-bugs@gnats.NetBSD.org>; Thu, 13 Jan 2011 10:53:33 +0000 (UTC)
Message-Id: <20110113105332.97ED563B89A@www.NetBSD.org>
Date: Thu, 13 Jan 2011 10:53:32 +0000 (UTC)
From: pooka@iki.fi
Reply-To: pooka@iki.fi
To: gnats-bugs@NetBSD.org
Subject: an endless stream of whiteout and opaque dir problems pours forth
X-Send-Pr-Version: www-1.0
>Number: 44383
>Category: kern
>Synopsis: an endless stream of whiteout and opaque dir problems pours forth
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: hannken
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 13 10:55:01 +0000 2011
>Closed-Date: Thu Aug 11 06:04:19 +0000 2011
>Last-Modified: Thu Aug 11 06:04:19 +0000 2011
>Originator: Antti Kantee
>Release:
>Organization:
>Environment:
>Description:
Assume the following directories (including the obvious implications):
/ro
/ro/dir
/ro/dir/file
/rw
mount_union -b /ro /rw maps /ro into /rw and makes the tree writable.
Then assume we do rmdir(/rw/dir). The operation should either
fail or make /rw seem empty. Maybe it should fail, but at least
with our current implementation it succeeds. Since the operation
succeeds, stat(/rw/dir) should fail without a question. It doesn't.
Even if dir/file does NOT exist, rmdir(dir) succeeds and stat still
succeeds afterwards.
Also, a future mkdir(/rw/dir) should *not* expose the contents of
/ro again, i.e. create an opaque directory. Currently mkdir fails
with the kind of expected EEXIST.
tests/fs/vfs/t_union whiteout attempts to test the these issues
but fails miserably in a variety of ways.
It's probably easy to toy more elementary cases into the test.
Even though unionfs has its inherent problems, the semantics
for a r/o lower layer are generally well-defined and should be
expected to work even for fs namespace management.
(I don't claim to understand how the upper layer will remain
generally usable with all the whiteouts accumulating over
time, but that's another PR)
>How-To-Repeat:
run the test. if a problem accidentally gets fixed, change the
test a little to expose another problem.
>Fix:
define union semantics with test cases. fix. iterate.
>Release-Note:
>Audit-Trail:
From: "Antti Kantee" <pooka@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/44383 CVS commit: src/tests/fs/vfs
Date: Thu, 13 Jan 2011 11:00:20 +0000
Module Name: src
Committed By: pooka
Date: Thu Jan 13 11:00:20 UTC 2011
Modified Files:
src/tests/fs/vfs: t_union.c
Log Message:
xfail PR kern/44383: whiteouts are generally speaking kaput
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/fs/vfs/t_union.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Antti Kantee <pooka@iki.fi>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/44383: an endless stream of whiteout and opaque dir problems pours forth
Date: Thu, 13 Jan 2011 13:08:19 +0200
One more thing: if looking into this, please analyze everything I wrote
with extreme prejudice. unions make my brain do a few somersaults too
many ....
From: "Juergen Hannken-Illjes" <hannken@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/44383 CVS commit: src
Date: Fri, 5 Aug 2011 08:17:48 +0000
Module Name: src
Committed By: hannken
Date: Fri Aug 5 08:17:48 UTC 2011
Modified Files:
src/sys/fs/union: union_vnops.c
src/tests/fs/vfs: t_union.c
Log Message:
When union_lookup() creates a shadow directory and nameiop is not LOOKUP
it has to restart the lookup to get the componentname right.
Fixes PR #44383 (an endless stream of whiteout and opaque dir problems ...)
To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/fs/union/union_vnops.c
cvs rdiff -u -r1.6 -r1.7 src/tests/fs/vfs/t_union.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: kern-bug-people->hannken
Responsible-Changed-By: hannken@NetBSD.org
Responsible-Changed-When: Thu, 11 Aug 2011 06:04:19 +0000
Responsible-Changed-Why:
Take.
State-Changed-From-To: open->closed
State-Changed-By: hannken@NetBSD.org
State-Changed-When: Thu, 11 Aug 2011 06:04:19 +0000
State-Changed-Why:
Fixed in tree.
>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.